New to R, I'm struggling to change the reference date of one of my variables to that of another date. Any help would be much appreciated.
The current reference year is 2002 and I need to change the reference year so that it is 2015. Also, all my values in this column needs to be updated in accordance to the changed reference year. Thanks.
tsunami_data
colnames(tsunami_data)[1] <- "years_before"
Currently the years before are in relation to the date 2002 and I need to update to that of 2015, so that the years before become larger because of the shift in the date. Aslo, I am using a large data set at present. thanks.
e.g.
years_before
- 7
- 56
- 87
- 45