I can perform sapply without problems, but I can not parallelize. In the original script I have more than 9,000,000 lines and so it is unfeasible 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.