2
I can perform the sapply smoothly, but I can’t parallel. In the original script I have more than 9,000,000 lines and so it is impossible to continue without parallelization.
dfteste<-data.frame(c(1,1,1),c(1,1,1),c(1,1,1))
apteste<-sapply(1:3,function (x) {paste(dfteste[x,], collapse="-")})
library(parallel)
cl<-makeCluster(4)
apteste<-parSapply(cl,1:3,function (x) {paste(dfteste[x,], collapse="-")}) #nao funciona
stopCluster()
Thank you.