Skip to content

Commit a73af45

Browse files
committed
fix y_critical_obs definition
1 parent bc544bf commit a73af45

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

R/msImpute.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ msImpute <- function(y, method=c("v2-mnar", "v2", "v1"),
9191
}
9292

9393

94-
94+
if(!is.null(critical_obs)){
95+
y_critical_obs <- y[critical_obs,]
96+
y <- y[-critical_obs,]
97+
}
9598

9699
if(method=="v1"){
97100
message(paste("Running msImpute version", method))
98-
if (!is.null(critical_obs)) {
99-
y_critical_obs <- y[critical_obs,]
100-
y <- y[-critical_obs,]
101-
}
101+
102102
yimp <- scaleData(y, maxit = biScale_maxit)
103103
yimp <- msImputev1(yimp,
104104
rank.max = rank.max, lambda = lambda, thresh = thresh,

0 commit comments

Comments
 (0)