Re: [R] xts POSIXct index format

From: Joshua Ulrich <josh.m.ulrich_at_gmail.com>
Date: Sat, 05 Mar 2011 10:28:13 -0600

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, 2011 at 5:57 PM, rivercode <aquanyc_at_gmail.com> 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.
>
> Think I am missing the obvious.
>
> Cheers,
> Chris
>
> --
> View this message in context: http://r.789695.n4.nabble.com/xts-POSIXct-index-format-tp3336136p3336136.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.
>
______________________________________________ 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.
Received on Sat 05 Mar 2011 - 16:30:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 06 Mar 2011 - 05:10:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive