Skip to content
Prev 164365 / 398503 Next

repeated searching of no-missing values

On Wed, Dec 10, 2008 at 4:09 PM, Patrizio Frederic
<frederic.patrizio at gmail.com> wrote:
It's easily to do this with ddply from plyr:

library(plyr)
ddply(data, .(V1), colwise(cl))

In brief, this says to take the data frame called data and break it up
into pieces defined by the variable V1.  Then for each piece,
calculate cl for each column, and then join all the pieces back
together.

Hadley