Hi, I'm incredibly new to R (started about 2 days ago) and I've been searching all the forums for various issues. I've usually found a work around but I can't seem to get the investigate function to work quite right.
It will run, but then hits an error. The following is the error I'm getting.
> res.mca = MCA(poly, graph = FALSE)
> Investigate(res.mca, file = "MCA.Rmd", document = c("word_document", "pdf_document"))
-- creation of the .Rmd file (time spent : 0s) --
-- detection of outliers (time spent : 0.05s) --
0 outlier(s) terminated
-- analysis of the inertia (time spent : 0.1s) --
Error in checkForRemoteErrors(val) :
7 nodes produced errors; first error: argument to 'which' is not logical
In addition: Warning messages:
1: In if (document == "Word" | document == "word" | document == "doc" | :
the condition has length > 1 and only the first element will be used
2: In if (document == "html" | document == "HTML" | document == "HTML_document") { :
the condition has length > 1 and only the first element will be used
3: In if (document == "pdf" | document == "PDF") { :
the condition has length > 1 and only the first element will be used
4: In if (document == "word_document") { :
the condition has length > 1 and only the first element will be used
I found a post on stack overflow that mentioned trying traceback(), but what came back means absolutely nothing to me.
> traceback()
11: stop(count, " nodes produced errors; first error: ", firstmsg,
domain = NA)
10: checkForRemoteErrors(val)
9: staticClusterApply(cl, fun, length(x), argfun)
8: clusterApply(cl = cl, x = splitList(X, nchunks), fun = lapply,
FUN = fun, ...)
7: do.call(c, clusterApply(cl = cl, x = splitList(X, nchunks), fun = lapply,
FUN = fun, ...), quote = TRUE)
6: parLapply(cl = cl, X = as.list(X), fun = FUN, ..., chunk.size = chunk.size)
5: parSapply(clust, 1:100, function(x, ind, factors, row.w) {
X <- tab.disjonctif(sapply(factors, function(x, ind) {
as.factor(sample(x, ind, replace = TRUE))
}, ind = ind))
while (ncol(X) != sum(factors)) {
X <- tab.disjonctif(sapply(factors, function(x, ind) {
as.factor(sample(x, ind, replace = TRUE))
}, ind = ind))
}
X <- X * (row.w/sum(X))
svd.triplet(t(t(X/rowSums(X))/colSums(X)) - 1, row.w = rowSums(X),
col.w = colSums(X))$vs^2
}, ind = ind, factors = factors, row.w = row.w)
4: t(parSapply(clust, 1:100, function(x, ind, factors, row.w) {
X <- tab.disjonctif(sapply(factors, function(x, ind) {
as.factor(sample(x, ind, replace = TRUE))
}, ind = ind))
while (ncol(X) != sum(factors)) {
X <- tab.disjonctif(sapply(factors, function(x, ind) {
as.factor(sample(x, ind, replace = TRUE))
}, ind = ind))
}
X <- X * (row.w/sum(X))
svd.triplet(t(t(X/rowSums(X))/colSums(X)) - 1, row.w = rowSums(X),
col.w = colSums(X))$vs^2
}, ind = ind, factors = factors, row.w = row.w))
3: eigenRef(res, dim = NULL, q = q, time = time, parallel = parallel)
2: inertiaDistrib(res, file = file, ncp = ncp, time = time, figure.title = paste("Figure",
compteur), graph = FALSE, options = options)
1: Investigate(res.mca, file = "MCA.Rmd", document = c("word_document",
"pdf_document"))
I believe I have the lastest version of everything installed. I'm using FactoMineR, Factoshiny, FactoInvestigate, factoextra and I think ggplot2. I actually have most of the plots I need, and most of the tables, but that report with interpretation is invaluable.
I've been able to get this far by using code from books or articles, but I'm not really understanding it enough to be able to troubleshoot this one. Any help would be greatly appreciated.
Also, I have double posted - my original post was on a google forum for FactoMineR (https://groups.google.com/forum/#!topic/factominer-users/JDeWvIz4t74), but it's really important I get these results ASAP. I'm also not sure if I've marked it as the right topic, but as the investigate function is trying ot make a .rmd file, I thought it might be best here?
Thanks
Olivia