Determine season from Date using lubridate in R
I have a very big dataset with a DateTime Column containing POSIXct-Values. I need to determine the season (Winter - Summer) based on the DateTime column. I've created a function which works fine on a small dataset, but crashes when I use it on the large one. Can anybody see my mistake? I've created 4 functions: 3 subfunctions so that I can do logical comparisons and selection using *apply functions 1 function to determine the season Here are thefunctions: require(lubridate) # function for logical comparison (to be used in *apply) greaterOrEqual <- function(x,y){ ifelse(x >= y,T,F) } #