[R] specific package to laply
Benjamin
hess.bn at gmail.com
Thu May 14 20:01:50 CEST 2015
Hi,
I have a batch jobs problem for parallel code without sudo. When I try to
send a package to the different nodes, as follows:
.libPaths( c(.libPaths(),
"/my/first/library",
"/my/second/library")
)
library(foreach)
library(iterators)
library(parallel)
library(doParallel)
library(rvest)
cl <- makeCluster(detectCores())
registerDoParallel(cl)
sites <- paste0("https://www.site",1:2,".com")
html0 <- foreach(i=sites,.packages='rvest') %dopar% html(i)
I get the following output:
Error in e$fun(obj, substitute(ex), parent.frame(), e$data) :
worker initialization failed: there is no package called ‘rvest’
Calls: %dopar% -> <Anonymous>
Presumably, I need a way to export my .libPaths() to the nodes. Any
suggestions?
Thanks,
Benjamin
[[alternative HTML version deleted]]
More information about the R-help
mailing list