[R] permutation/randomization test assumption on observations

2011-05-21 Thread Wenjin Mao
Hi, I have two groups of data of different size:    group A: x1, x2, , x_n;    group B: y1, y2, , y_m; (m is not equal to n) The two groups are independent but observations within each group are not independent, i.e., x1, x2, ..., x_n are not independent; but x's are independent from

[R] permutation/randomization

2008-04-09 Thread Grant Gillis
Hello, I have what I suspect might be an easy problem but I am new to R and stumped. I have a data set that looks something like this b-c(2,3,4,5,6,7,8,9) x-c(2,3,4,5,6,7,8,9) y-c(9,8,7,6,5,4,3,2) z-c(9,8,7,6,1,2,3,4) data-cbind(x,y,z) row.names(data)-c('a','b','c','d','e','f','g','h') which

Re: [R] permutation/randomization

2008-04-09 Thread Tobias Verbeke
Grant Gillis wrote: Hello, I have what I suspect might be an easy problem but I am new to R and stumped. I have a data set that looks something like this b-c(2,3,4,5,6,7,8,9) x-c(2,3,4,5,6,7,8,9) y-c(9,8,7,6,5,4,3,2) z-c(9,8,7,6,1,2,3,4) data-cbind(x,y,z)

Re: [R] permutation/randomization

2008-04-09 Thread Philipp Pagel
On Wed, Apr 09, 2008 at 11:08:28AM -0700, Grant Gillis wrote: I would like to randomize data within columns. I think the following line does what you want (minus preserving the row labels): apply(data, 2, sample) Maybe someone smarter than me knows how to preserve the row names. I would

Re: [R] permutation/randomization

2008-04-09 Thread Greg Snow
PROTECTED] On Behalf Of Grant Gillis Sent: Wednesday, April 09, 2008 12:08 PM To: r-help@r-project.org Subject: [R] permutation/randomization Hello, I have what I suspect might be an easy problem but I am new to R and stumped. I have a data set that looks something like this b-c