[R] Create blocks or observations

Greg Snow Greg.Snow at imail.org
Fri Mar 26 16:18:33 CET 2010


[snip]

> 
>   group <- unlist( lapply( 1:numGroups, rep.int, times = 3 ) )

This can be done simpler with: group <- rep(1:numgroups, each=3)

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111



More information about the R-help mailing list