#make a horrible data frame:
ottawadates <- as.Date(c("2016-08-04", "2016-09-03", "2016-02-15", "2016-03-29, "2016-09-27"))
othervariable <- c(1, 2, 4, 5, 6)
df = data.frame(othervariable, ottawadates)
Okay, so all I'd like to do is create a new field called 'seasons'. I would like to use ranges of dates to indicate which dates belong to corresponding seasons. Just to be clear, my actual data set has the dates in a proper date format so I'm guessing indexing date ranges is fairly straightforward.
i.e. December 21st - March 19th is WINTER. March 20 - June 20th is SPRING June 21st - September 21 is SUMMER September 23 - December 20 is FALL
I feel like this is a for loop job, but I'm too novice to know how to go about it.
Thanks. I appreciate it!