[R] times

Gabor Grothendieck ggrothendieck at gmail.com
Thu Oct 28 13:45:16 CEST 2010


On Thu, Oct 28, 2010 at 1:06 AM, thoeb <t.hoebinger at gmail.com> wrote:
>
> Hi! I have an input table with a column "Dates" in the format
> "month/day/year" (eg. "5/11/1999" and a column "Times" in the format
> "hours/minutes" (eg. "15:20"). In R I need to convert them into chron
> objects to extract colums only containing months, days, minutes, ..
>
> For the dates it is no problem if I write:
> dmy.lwc<-chron(dates=lwc.file[,1],format=(dates="m/d/y"))
>
> But it does not work the same way for the times if I write:
> hm.lwc<-chron(times=lwc.file[,2],format=(times="h:m"))
>
> Error-Message: Error in convert.times(times., fmt) : format h:m may be
> incorrect
> In addition: Warning message:
> In is.na(out$s) : is.na() applied to non-(list or vector) of type 'NULL'
>
> Why should the format "h:m" not be correct?

This has been discussed before.  See:

http://r.789695.n4.nabble.com/zoo-read-intraday-data-tp3010256p3010312.html


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list