Message-ID: <756D3026-A098-4DFA-AD67-E999DE3668FF@dcn.davis.CA.us>
Date: 2015-05-14T18:21:25Z
From: Jeff Newmiller
Subject: specific package to laply
In-Reply-To: <CAKdEGU9E+PhgJPO6GFtbWC0Hs+gs6BF7Ru0Xu9OZzXko6bAArg@mail.gmail.com>
I suggest you post using plain text to minimize communication problems on this list.
I use the clusterEvalQ and cluster export functions to setup the slave processes before I start processing.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On May 14, 2015 11:01:50 AM PDT, Benjamin <hess.bn at gmail.com> wrote:
>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]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.