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
c(7, 8, 9, 10, 1, 2, 3, 4, 5, 6)[as.numeric(data$column) + 1]