Hi all... I built a matrix binding vectors with rbind, and have something like this:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] CLS 3.877328 4.087636 4.72089 4.038361 3.402942 2.786285 2.671222 3.276419 ORD NaN NaN NaN NaN 5.770780 5.901113 11.888054 7.934823 FAM NaN NaN NaN NaN NaN 3.699455 4.551196 2.885390 GEN NaN NaN NaN NaN NaN 3.967411 4.390296 2.885390 SPP NaN NaN NaN NaN NaN NaN NaN 2.885390 Then I tried to assign names to each column with names(), but end up with the following: > names(tester) <- c("uno","dos","tres","cuatro","cinco","seis","siete","ocho") [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] CLS 3.877328 4.087636 4.72089 4.038361 3.402942 2.786285 2.671222 3.276419 ORD NaN NaN NaN NaN 5.770780 5.901113 11.888054 7.934823 FAM NaN NaN NaN NaN NaN 3.699455 4.551196 2.885390 GEN NaN NaN NaN NaN NaN 3.967411 4.390296 2.885390 SPP NaN NaN NaN NaN NaN NaN NaN 2.885390 attr(,"names") [1] "uno" "dos" "tres" "cuatro" "cinco" "seis" "siete" "ocho" [9] NA NA NA NA NA NA NA NA [17] NA NA NA NA NA NA NA NA [25] NA NA NA NA NA NA NA NA [33] NA NA NA NA NA NA NA NA I can use colnames(tester), but then I cannot identify the colnames on the points when I plot them. How can I set the names(tester) for the whole matrix? Thanks a lot. Germán, UNAM [[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.