Skip to content
Prev 165950 / 398502 Next

passing parameters to an R script

On Sat, Jan 3, 2009 at 1:32 PM, <mauede at alice.it> wrote:
Normally this is done by passing back the modified variable as
the return value:
[1] 1

Another possibility is to use environments.  In the following function fn
increments component x of environment e:
[1] 1

You can use parent.frame() to refer to
the calling environment. ?parent.frame

It may be that e above is really best viewed
as an object in object oriented programming.
In that case the proto package implements
such a model in R and R.oo implements a
different oo model.
?commandArgs