[prev in list] [next in list] [prev in thread] [next in thread]
List: r-devel
Subject: Re: [Rd] %OS on output
From: Joshua Ulrich <josh.m.ulrich () gmail ! com>
Date: 2016-02-24 17:02:29
Message-ID: CAPPM_gTU-6D2nEc0AkU0Q_hCyhMqofz5sNEH0ngf0GXAx9NvNQ () mail ! gmail ! com
[Download RAW message or body]
On Wed, Feb 24, 2016 at 10:40 AM, Suharto Anggono Suharto Anggono via
R-devel <r-devel@r-project.org> wrote:
> R help on 'strptime' has the following in "Details" section.
> Specific to R is ‘%OSn', which for output gives the seconds truncated to ‘0 <= \
> n <= 6' decimal places (and if ‘%OS' is not followed by a digit, it uses the \
> setting of ‘getOption("digits.secs")', or if that is unset, ‘n = 3').
> In reality, for output, if '%OS' is not followed by a digit and \
> getOption("digits.secs") is unset, the output has no fractional part, as if n = 0 \
> is used.
That's because n = 0 _is_ used, and appears to have always been the
default (since the logic was added in r37395). So this appears to be
a typo in the documentation (the comment about "n=3" when digits.secs
is unset was added in r37439).
> > getOption("digits.secs")
> NULL
> > z <- strptime("20/2/06 11:16:16.683", "%d/%m/%y %H:%M:%OS")
> > format(z, "%OS")
> [1] "16"
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
R/Finance 2016 | www.rinfinance.com
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic