I simply want to change the name of the column in the matrix from "worldwide_vector" to "Worldwide". Everything is in the image.
Asked
Active
Viewed 5,585 times
-5
-
Possible duplicate of [Changing column names of a data frame](https://stackoverflow.com/questions/6081439/changing-column-names-of-a-data-frame) – Tino Nov 30 '17 at 06:12
-
1Just from your last two questions, you may want to read [ask]. – Rich Scriven Nov 30 '17 at 06:23
1 Answers
1
Since you are using a matrix, you need colnames
colnames(star_wars_matrix)[colnames(star_wars_matrix) == "worldwide_vector"] <- "Worldwide"

Tino
- 2,091
- 13
- 15