[R] read.zoo - combining two columns with date and time respectively into one index column?
David Winsemius
dwinsemius at comcast.net
Thu Mar 22 15:16:23 CET 2012
On Mar 22, 2012, at 8:24 AM, knavero wrote:
> I have three columns in my raw data: date, time, and dry bulb
> temperature:
>
> http://r.789695.n4.nabble.com/file/n4495326/weathDataSDCoron.txt
> weathDataSDCoron.txt
>
> The date format is %Y%m%d and the time format is %H:%M. Any ideas on
> how to
> read it in such that it looks at the first two columns and then
> merges it
> into one column combining both the date and time?
I'm reasonably optimistic that read.zoo will do that. It's capable of
two column datetime reads. My memory is that you just give the column
numbers to the index.column argument. You will also need to give a
format argument since your formats to not look to be bog standard.
>
> --
> View this message in context: http://r.789695.n4.nabble.com/read-zoo-combining-two-columns-with-date-and-time-respectively-into-one-index-column-tp4495326p4495326.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list