[R] APPLY as alternate to FOR loop?
Johannes Hüsing
johannes at huesing.name
Wed Apr 2 21:04:31 CEST 2008
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")
More information about the R-help
mailing list