Q:

How to rename data within a dataframe

I have a dataframe but the numbering of the months is all jumbled. I need to change the following rows to the following, but i'm struggling to see an easy way through. I'm aware that this code changes the data, but it's just a case of working out the puzzle without adding columns together. 
data$column[data$column == "0"] <- "7" 

0 <- 7   
1 <- 8
2 <- 9
3 <- 10
4 <- 1
5 <- 2
6 <- 3
7 <- 4
8 <- 5
9 <- 6 

Thank you

A:

maybe plyr::mapvalues() can help you here:
library(plyr)
df$column <- mapvalues(df$column, from = c(0,1:9), to = c(7:10, 1:6))

