> iris2
         Setosa Versicolor Virginica 
Sepal L.  5.006      5.936     6.588
Sepal W.  3.428      2.770     2.974
Petal L.  1.462      4.260     5.552
Petal W.  0.246      1.326     2.026
> matrix.to.factor(iris2)
   rowfactor  colfactor  body 
 1  Sepal L.     Setosa 5.006
 2  Sepal W.     Setosa 3.428
 3  Petal L.     Setosa 1.462
 4  Petal W.     Setosa 0.246
 5  Sepal L. Versicolor 5.936
 6  Sepal W. Versicolor 2.770
 7  Petal L. Versicolor 4.260
 8  Petal W. Versicolor 1.326
 9  Sepal L.  Virginica 6.588
10  Sepal W.  Virginica 2.974
11  Petal L.  Virginica 5.552
12  Petal W.  Virginica 2.026