I have thousands of rows in this column. I would like to create a different column with four seasons based on Col 1. The 4 seasons are: SON (Sep, Oct, Nov), MAM (Mar, Apr, May), DJF (Dec, Jan, Feb) and JJA (Jun, Jul, Aug) based on the month in Col 1.
Col 1
6/9/2013 1:15
3/29/2005 21:00
4/16/2007 15:15
So the output would be something like
Col 1 Month Season
6/9/2013 1:15 June JJA
3/29/2005 21:00 March MAM
4/16/2007 15:15 April MAM
Etc.
I did this,
all["month"]<-strptime(all$col1,"%m/%d/%Y %H:%M", tz="UTC")$mon
all["monthname"]<-factor(all$month, levels=1:12, labels=month.name)
But I am not sure how to do this.