Hi R-users

 

I can not change the name of one column only of my matrix.

 

my_matrix <- matrix (1:12,ncol=3)

 

colnames(my_matrix)[1] <- 'myname'

 

Error in dimnames(x) <- dn : 

  length of 'dimnames' [2] not equal to array extent

 

thank you for your help

 

Lorenzo


	[[alternative HTML version deleted]]

