[R] assign names to matrix

Pan_Yuming@aam.de Pan_Yuming at aam.de
Thu Nov 16 16:54:55 CET 2000



dear all,

i have a matrix and i dont know how to assign names to this matrix.

given v is 100x5 matrix, and label -> c("A","B","C","D","E")

idealy, names(v) <- label, but it doesnt work for different length

if dimnames(v) <- list(1:nrow(v),label), then names(v) return NULL

any smart ways? thanks in advance.

best regards
pan yuming



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list