I have this function and want to run it parallel with different sets of data. Using SNOW and clusterApplyLB.
system.time(out <- mclapply(cData, plotGraph)) #each cData contains 100X6000 doubles system.time(out <- mclapply(cData2, plotGraph)) system.time(out <- mclapply(cData3, plotGraph)) system.time(out <- mclapply(cData4, plotGraph)) system.time(out <- mclapply(cData5, plotGraph)) system.time(out <- mclapply(cData6, plotGraph)) plotGraph() <- function(cData) { cl = unname(cor(cData)) result = cbind(as.vector(row(cl)),as.vector(col(cl)),as.vector(cl)) result = result[result[,1] != result[,2],] corm = result corm =corm[abs(corm[,3]) >= CORRELATION, ] # remove low cor pairs library(network); library(sna) net <- network(corm, directed = F) # the network cd <- component.dist(net) # component analysis delete.vertices(net, which(cd$csize[cd$membership] == 1)) # delete genes not connected with others plot(net) } -- View this message in context: http://r.789695.n4.nabble.com/using-SNOW-and-clusterApplyLB-to-run-jobs-parallel-tp3253060p3253060.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.