To create a dataframe with years from 2015 until 2023 in R, we can use the seq() function to generate a sequence of dates with the desired start and end dates, and then convert it to a data frame using the as.data.frame() function. Here's the code:
main.r273 chars12 lines
This will result in a data frame with a single column named "year" and rows for each year from 2015 through 2023:
main.r80 chars11 lines
gistlibby LogSnag