Re: [R] xts POSIXct index format

2011-03-06 Thread Joshua Ulrich
Hi David, On Sat, Mar 5, 2011 at 11:00 PM, David Winsemius wrote: > > On Mar 5, 2011, at 11:28 AM, Joshua Ulrich wrote: > >> Hi Chris, >> >> Perhaps something like this? >> >> require(xts) >> ds <- options(digits.secs=6) # so we can see sub-seconds >> x <- xts(1:10, as.POSIXct("2011-01-21") + c(1

Re: [R] xts POSIXct index format

2011-03-05 Thread David Winsemius
On Mar 5, 2011, at 11:28 AM, Joshua Ulrich wrote: Hi Chris, Perhaps something like this? require(xts) ds <- options(digits.secs=6) # so we can see sub-seconds x <- xts(1:10, as.POSIXct("2011-01-21") + c(1,1,1,2:8)/1e3) x indexFormat(x) <- "%H:%M:%OS3" x Joshua; Does your reading of help(i

Re: [R] xts POSIXct index format

2011-03-05 Thread rivercode
Thank you for your help. indexFormat(x) solved the problem nicely. > head(a) 2011-03-04 09:30:00.0 22.10 2011-03-04 09:30:00.1 22.09 2011-03-04 09:30:00.2 22.10 2011-03-04 09:30:00.3 22.09 2011-03-04 09:30:00.4 22.10 2011-03-04 09:30:00.5 22.09 > indexFormat(a) <- "%H:%M:%OS3" > head(a)

Re: [R] xts POSIXct index format

2011-03-05 Thread Joshua Ulrich
Hi Chris, Perhaps something like this? require(xts) ds <- options(digits.secs=6) # so we can see sub-seconds x <- xts(1:10, as.POSIXct("2011-01-21") + c(1,1,1,2:8)/1e3) x indexFormat(x) <- "%H:%M:%OS3" x Hope that helps, -- Joshua Ulrich  |  FOSS Trading: www.fosstrading.com On Fri, Mar 4, 20

Re: [R] xts POSIXct index format

2011-03-05 Thread David Winsemius
On Mar 4, 2011, at 6:57 PM, rivercode wrote: Hi, I cannot figure out how to change the index format when displaying POSIXct objects. Would like the xts index to display as %H:%M:%OS3 when doing viewing the xts object. If you are not satisfied with the default format, you have (at leas

[R] xts POSIXct index format

2011-03-04 Thread rivercode
Hi, I cannot figure out how to change the index format when displaying POSIXct objects. Would like the xts index to display as %H:%M:%OS3 when doing viewing the xts object. Think I am missing the obvious. Cheers, Chris -- View this message in context: http://r.789695.n4.nabble.com/xts-POSIX