[R] Conditional looping over a set of variables in R

Gabor Grothendieck ggrothendieck at gmail.com
Mon Oct 25 01:12:55 CEST 2010


On Sun, Oct 24, 2010 at 2:54 PM, Peter Ehlers <ehlers at ucalgary.ca> wrote:
> Whoops, got an extra comma in there somehow; should be:
>
>  apply(d, 1, function(x) match(1, x))
>

A slight variation on this would be:

   apply(d, 1, match, x = 1)


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list