Hi all,
I am trying in vain to create a new object "Year" in my data frame from
existing Date data. I have tried many different approaches, but can't seem
to get it to work. Here is an example of some code I tried.
date1<- as.Date(wells$Date,"%m/%d/%Y")
wells$year<-as.numeric(format(date1, "%Y"))
Hi all,
I am trying in vain to create a new object "Year" in my data frame from
existing Date data. I have tried many different approaches, but can't seem
to get it to work. Here is an example of some code I tried.
date1<- as.Date(wells$Date,"%m/%d/%Y")
wells$year<-as.numeric(format(date1, "%Y"))
2 matches
Mail list logo