Re: [R] APPLY as alternate to FOR loop?

From: Johannes Hüsing <johannes_at_huesing.name>
Date: Wed, 02 Apr 2008 21:04:31 +0200

Bill.Venables_at_csiro.au <Bill.Venables_at_csiro.au> [Mon, Mar 31, 2008 at 07:02:25AM CEST]:
> As far as I know there is no function called 'APPLY'
>
> There is one called 'apply', but why are you determined to use it here?
> It is essentially concealed looping.

I always use apply instead of for when the steps can be performed independently and are parallelizable. By the same token as I use map instead of recursion in Lisp.

R is essentially concealed Lisp, or so I'm told.

-- 
Johannes Hüsing               There is something fascinating about science. 
                              One gets such wholesale returns of conjecture 
mailto:johannes_at_huesing.name  from such a trifling investment of fact.                
http://derwisch.wikidot.com         (Mark Twain, "Life on the Mississippi")

______________________________________________
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 Wed 02 Apr 2008 - 19:07:49 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 Wed 02 Apr 2008 - 19:30:26 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