rookie_1_team$year[1:5] <- "2018"
rookie_1_team$year[6:10] <- "2017"
rookie_1_team$year[11:15] <- "2016"
rookie_1_team$year[16:20] <- "2015"
rookie_1_team$year[21:25] <- "2014"
Is there a way to write this in a for loop or a function instead of just manually putting it in all the way to 2000. Or maybe an apply?
So it would be a sequence of 5 before going down a year to then go to the next year like 2017. Then go through 5 again filling out 2017 then go down one again to 2016.
Any hints or help would be great. Still very new to R.
Thanks in advance.