Re: [R] Global variables

2011-05-02 Thread abhagwat
Well, what would be really helpful is to restrict the scope of all non-function variables, but keep a global for scope of all function variables. Then, you still have access to all loaded functions, but you don't mix up variables. How would one do that? Adi > Is there a way I can prevent global

Re: [R] parallel computation in plyr 1.7

2012-01-12 Thread abhagwat
Additional question: the plyr package mentions that parallel computation can be set up using the parallel computing backend from 'foreach'. Is this limited to executing the following two lines on a UNIX machine (source http://cran.r-project.org/web/packages/doMC/.../gettingstartedMC.pdf getting

Re: [R] parallel computation in plyr 1.7

2012-01-12 Thread abhagwat
The code below shows that (1) the way to activate the parallel backend indeed is to use 'registerDoMC' (2) the function d_ply does NOT accept the argument parallel, while the function ddply does. Perhaps it is interesting to add this feature to d_ply, l_ply and a_ply too? As a workaround one can of

[R] quotes in Rscript -e through system

2012-05-24 Thread abhagwat
I figured out how to use quotes and parentheses when using Rscript -e (on a bash shell): Rscript -e write\(1,\"a.txt\"\) --> Question 1: why do the parentheses need to be escaped in the shell? (More a shell than an R question) Then I figured out how to use quotes and parentheses when calling Rsc