Re: [R] Generating contingency tables from the null

2011-08-29 Thread Jean V Adams
By the "null distribution" do you mean that the assignment of each observation to a column is equal? If so, the function sample() might serve your needs. For example: rows <- 3 cols <- 4 rowtot <- 100 m <- matrix(NA, nrow=rows, ncol=cols) for(i in seq(rows)) { m[i, ] <- tabulate(samp

Re: [R] Generating contingency tables from the null

2011-08-28 Thread Jim Silverton
Hi all, I have a 3x4 contingency table with row totals all being 100. I want to generate 3 x 4 tables from the null distribution. Which R function can do this? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org maili