I came up with a strange mistake. Suppose I have 10 xxt objects in a list called data. Now I am looking for three combinations using
data_names <- names(data) combs <- combn(data_names, 3)
My main goal is to make a PCA on these 1080 triples. To speed things up, I wanted to use the doParallel package. So, the fragment is reduced to the moment the error occurs:
list <- foreach(i=1:ncol(combs)) %dopar% { tmp_triple <- combs[,i] p1<-data[tmp_triple[[1]]][[1]] p2<-data[tmp_triple[[2]]][[1]] p3<-data[tmp_triple[[3]]][[1]] data.merge <- merge(p1,p2,p3,all=FALSE) }
Here the merge function seems to be a problem. Error
task 1 failed - "cannot force class" c ("xts", "zoo") "in data.frame"
However, when changing% dopar% to normal serial% do do%, everything works as accepted.
So far, I could not find a solution to this problem, and I'm not even sure what to look for.
source share