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    1    2    3
row2   11   12   13

===>
      row   col    dat
1    row1  col1  1
2    row1  col2  2
3    row1  col3  3
4    row2  col1  11

5    row2  col2  12

6    row2  col3  13







      
        [[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