Skip to content
Prev 310628 / 398506 Next

Matrix to data frame conversion

The problem seems to be that at least two of the 90 rows of your matrix have
the same rowname (called dimnames in a matrix). When you converted to .csv,
the rownames were added as a variable (called X) so they were not checked
for duplicates.

Try length(unique(test$X)). You should get a number less than 90.

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352