I have a matrix, say X, whose columns I need to use in R. I named each column using the colnames command. However, when I type the name of a column, nothing comes up. To illustrate, I used a code like the one below:
colnames(X) <- c("column1","column2")
When I type X, column1 and column2 appear at the top of the columns. However, when I type column1 or column2, they cannot be found.
Does anyone know what needs to be done?