Re: [R] Create factorial design

2011-02-05 Thread Petr Savicky
On Sat, Feb 05, 2011 at 11:01:33AM +0100, Sascha Vieweg wrote: > I have got data with one column indicating the area where the data > was recorded: > > R: n <- 43 > R: df <- data.frame("area"=sample(1:7, n, repl=T), "dat"=rnorm(n)) > > In each of the 7 different areas I want to implement one of

[R] Create factorial design

2011-02-05 Thread Sascha Vieweg
I have got data with one column indicating the area where the data was recorded: R: n <- 43 R: df <- data.frame("area"=sample(1:7, n, repl=T), "dat"=rnorm(n)) In each of the 7 different areas I want to implement one of 7 specific strategies. The assignment should be random. Therefore, I pair