speed issue in R computing: apply() vs a loop
April 23, 2008 · Posted in R bloggers · Comments Off
In R, apply() is NOT faster than a loop!!I don't know where I pick up this perception about apply() being faster than a loop in R. For a long time, I always think that apply() runs a function (for example, mean()) on a data structure (row or column) in a single shot. So take the mean of each row in the same time. And a loop does it n.row or n.column times. So assuming running a single shot ofAn R Wiki
April 21, 2008 · Posted in R bloggers · Comments Off
It’s been ages since I visited the R website, so I don’t know how long they’ve had a wiki. It’s built using DokuWiki, one of my personal favourites.
This is a great leap forward for R documentation, which is somewhat notorious for being (a) difficult to find and (b) difficult to understand when you find it. If you’re a power R user and have a spare moment, please contribute.

