I have a question about the colnames function in the base package
colnames
Let\'s say you have a data.frame, as follows:
df <- data.frame(var
Because you should be doing this:
> colnames(df)[1] <- "test" > colnames(df)[1] [1] "test"
The colnames function returns a character vector that can be altered.