Which part? This might help: rep(1:5, each=9)
On Tue, Jan 31, 2012 at 1:22 PM, Daniel Negusse <daniel.negu...@my.mcphs.edu> wrote: > can someone tell me if there is an easier way to do this in R - create a > design matrix? thanks. > —> design <- model.matrix(~ > -1+factor(c(1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5))) > # Creates an appropriate design matrix > can someone tell me if there is an easier way to do this matrix? > thanks. -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.