[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