I'm stuck on what seems simple, but can't find a solution while searching.
I want to be able to repeat the following vector down the dataframe, for each Diamond_ID.
I have:
DIAMOND_ID <- c(1,2,3,4,5)
MY_MONTHS <- c(201501,201502,201503,201504,201505,201506)
So then for each Diamond ID, the months vector would repeat, i.e. the ideal solution would be a dataframe such as:
I imagine this is a loop function? This is my first week in R.
Thanks in advance.