[R] Scope and sapply

Gabor Grothendieck ggrothendieck at gmail.com
Sun Jun 13 13:50:46 CEST 2010


On Sat, Jun 12, 2010 at 11:40 PM, Worik R <worikr at gmail.com> wrote:
> I was careless.
>
> Here is a better example of what I am trying to.  With the '<<-' you
> offered.
>
> ?<<-
>
> That was exactly what I needed, thankyou.
>

Just as an aside I am assuming these are just examples to illustrate
scope.  In reality you would rarely use <<-  and instead would just
return the computed value as the value of the function.  Also see
cumsum and cumprod and check out this page:
http://cran.r-project.org/web/views/Finance.html



More information about the R-help mailing list