Fix reporting scripts
[morpheus.git] / reports / accuracy.R
index 91d9c61..535f88f 100644 (file)
@@ -13,11 +13,10 @@ optimBeta <- function(N, n, K, p, beta, b, link, weights, ncores)
                                mu <- computeMu(fargs$X, fargs$Y, fargs$optargs)
         op <- optimParams(K,fargs$optargs$link,fargs$optargs)
         x_init <- list(p=rep(1/K,K-1), beta=mu, b=rep(0,K))
+                               res2 <- NULL
                                tryCatch({
           res2 <- do.call(rbind, op$run(x_init))
-                               }, error = function(e) {
-                                       res2 <- NA
-                               })
+                               }, error = function(e) {})
                                res2
                        }
 #                      ,