[R] Formatting YYYY-MM after reading text file [RESOLVED]
Rich Shepard
rshepard at appl-ecosys.com
Sat Jun 27 00:02:55 CEST 2015
On Fri, 26 Jun 2015, MacQueen, Don wrote:
> I would have just assigned them all to the first day of the month, using
> as.Date( paste0(allchem$sampdate,'-01') )
> (or maybe the middle of the month represented by the 15th)
> and then had a variable that was of the Date class in the base R (with
> which I am familiar, no small consideration).
Don,
The original data had the day of the month, but that's not important. I
suppose I could leave it in and still analyze and plot by month.
> Depending on what needs to be done with them -- plotting with a date axis?
> -- calculating elapsed time between sampling events? -- I suppose one or
> the other of 'yearmon' or 'Date' might be more convenient.
Simple is better.
Thanks,
Rich
More information about the R-help
mailing list