Re: [R] Scope and sapply

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sun, 13 Jun 2010 07:50:46 -0400

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



R-help_at_r-project.org mailing list
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. Received on Sun 13 Jun 2010 - 11:53:06 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 13 Jun 2010 - 12:40:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive