Skip to content

%OS on output

2 messages · Suharto Anggono Suharto Anggono, Joshua Ulrich

#
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.
NULL
[1] "16"
#
On Wed, Feb 24, 2016 at 10:40 AM, Suharto Anggono Suharto Anggono via
R-devel <r-devel at r-project.org> wrote:
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).