An alternative is to use the ffDesMatrix(..) procedure in the BHH2 
library (from CRAN mirrors) - it's drawn from _Statistics for 
Experimenters_ by Box, Hunter, and Hunter (hence the name). It will 
general a variety of design matrices - best for factorial and fractional 
factorial. It has a bunch of other useful experimental design goodies.

David Stevens

On 1/31/2012 12:34 PM, Sarah Goslee wrote:
> 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.

-- 
David K Stevens, P.E., Ph.D., Professor
Civil and Environmental Engineering
Utah Water Research Laboratory
8200 Old Main Hill
Logan, UT  84322-8200
435 797 3229 - voice
435 797 1363 - fax
david.stev...@usu.edu




        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to