Re: [R] create a data.frame for aov

2010-05-11 Thread Dennis Murphy
Hi: mdf3 <- as.data.frame.table(as.table(mdat)) > mdf3 Var1 Var2 Freq 1 row1 Col11 2 row2 Col1 11 3 row1 Col22 4 row2 Col2 12 5 row1 Col33 6 row2 Col3 13 HTH, Dennis On Mon, May 10, 2010 at 10:38 PM, Yuan Jian wrote: > Hi R-experts, > > I try to find a way to transfer a mat

[R] create a data.frame for aov

2010-05-11 Thread Yuan Jian
Hi R-experts, I try to find a way to transfer a matrix to a data.frame that is used as input of aov. can you give me advice for that? >mdat <- matrix(c(1,2,3, 11,12,13), nrow = 2, ncol=3, byrow=TRUE, dimnames = >list(c("row1", "row2"), c("Col1", "Col2", "Col3"))) >mdat Col1 Col2 Col3 row1