Hi, I am new to EMCluster so first trying out the example workflow. I tried all workflows, and found out that the code below cause error.
for(k.var in 1:dim(var)[3]){
# Check degenerate.
tmp <- try(solve(var[,, k.var]), silent = TRUE)
if(class(tmp) == "try-error"){
flag <- 1
break
}
}
Error in if (class(tmp) == "try-error") { : the condition has length > 1
I figured out that the classes of the object tmp are "matrix" and "array", which generates the error above. For now, I avoided the error by choosing the first class (class(tmp)[1] ) to infer "try-error" but I do think this needs improvement.