I am importing some data from NOAA and it has dates and times in separate columns. I searched for an elegant way to append a single datetime column in my R dataframe but was unable. I found a stack exchange question about the inverse but not this one. Is there a simple as.Date command I could run? I am simply using read.table for a downloaded text file and it imports just find.
Buoy data is here:
http://www.ndbc.noaa.gov/data/realtime2/51202.txt
>yr mo dy hr mn degT m.s m.s.1 m sec sec.1 degT.1 hPa degC degC.1 degC.2 nmi hPa.1 ft
>2012 1 16 3 55 MM MM MM 1.4 10 7.2 339 MM MM 23.9 MM MM MM MM
You can use
ISOdatetime, which is just a simple wrapper toas.POSIXct. Make sure to specify thesecargument as zero.