An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-hpc/attachments/20090426/834496a5/attachment.pl>
snow: export data inside function and check worspaces
2 messages · Matthieu Stigler, Steve Weston
On Mon, Apr 27, 2009 at 2:53 AM, Matthieu Stigler
<matthieu.stigler at gmail.com> wrote:
Hi
I have two questions for package snow:
1 How do I export object defined within a function with clusterExport()?
snow use get("object", env=.GlobalEnv) but the object within a function
belong to the function env and not globalenv if I understood well.
If you want to use clusterExport, I believe you would have to first assign the value of the local variable to a global variable, since that is the only thing that clusterExport will operate on. You might want to consider other methods of handling that data, though.
2 How do I check the objects sent? I tried clusterCall(cl, ls()) but gives me character(0)
Try something like: clusterCall(cl, function() ls(globalenv()))
Steve Weston REvolution Computing One Century Tower | 265 Church Street, Suite 1006 New Haven, CT 06510 P: 203-777-7442 x266 | www.revolution-computing.com