[R] its does not recognize POSIXct w/ both time and Date?

B. Bogart bbogart at sfu.ca
Mon Nov 5 21:50:55 CET 2007


Hello all,

I'm getting much further with my time-series work, but still getting 
into some problems.

I'm using POSIXct time format with both date and time.

I'd like to use that in an its object but It seems its only processes 
the date part of the POSIX time stamps:

BMU_its_data <-  its(data[BMUindex,2-4],dates=data[BMUindex,1])
Error in `row.names<-.data.frame`(`*tmp*`, value = c("2007-10-31", 
"2007-10-31",  :


The first column of the data is certainly correct, with both date and time:

 > summary(data[BMUindex,1])
                     Min.                   1st Qu.                    
Median
"2007-10-31 07:00:00 UTC" "2007-11-01 07:00:00 UTC" "2007-11-03 07:00:00 
UTC"
                     Mean                   3rd Qu.                      
Max.
"2007-11-02 21:44:12 UTC" "2007-11-04 07:00:00 UTC" "2007-11-05 08:00:00 
UTC"

Perhaps the functions used in its are unable to see the time field. I 
noticed that using unique() on the same data gives me only 6 different 
values, one for each day, with the times ignored.

Is there any time format I can use in R (through its or zoo or fCalendar 
or anything) that allows me to use tools such as unique() and so on and 
have the times (not only dates) considered?

I've chosen its because it seems to have pretty good ts specific 
plotting stuff in there, but I'd be willing to use anything that allows 
me to work with my POSIX dates down to the second. (or even msec)

Thanks.
B. Bogart



More information about the R-help mailing list