[R] Remove Column from matrix

JoAnn Alvarez joann.alvarez at vanderbilt.edu
Wed Nov 21 19:58:57 CET 2012


Hi frespider,

I think the problem is first that you are referring to column names that you
haven't yet defined. To add the column names you can use the dimnames
argument of the matrix function.

Asse <- matrix(0,nrow=5,ncol=length(namVar), dimnames = list(NULL, namVar)) 

JoAnn



--
View this message in context: http://r.789695.n4.nabble.com/Remove-Column-from-matrix-tp4650334p4650344.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list