Learn R Programming

splusTimeDate (version 1.5.0-72)

timeDateOptions: Set or Return timeDate Options

Description

Provides the means to set or view global options for working with timeDate objects and classes.

Usage

timeDateOptions(...)

Arguments

...
you can give a list or vector of character strings as the only argument, or you can give any number of arguments in the name=value form. Optionally, you can give no arguments. See the Value and Side Effects sections for

Value

  • Always returns a list, even if the list is of length 1.
    • If no arguments are given,timeDateOptionsreturns a list of current values for all options.
    • If a character vector is given as the only argument,timeDateOptionsreturns a list of current values for the options named in the character vector.
    • If an object of mode"list"is given as the only argument, its components become the values for options with the corresponding names.timeDateOptionsreturns a list of the option values before they were modified. Usually, the list given as an argument is the return value of a previous call totimeDateOptions.
    • If arguments are given inname=valueform, the values of the specified options are changed andtimeDateOptionsreturns a list of the option values before they were modified.

Default values

The default values for some of the common options listed above are as follows. Options that have never been set have the value NULL sequence.tol=1e-6 time.am.pm=c("AM", "PM") time.century=1930 time.in.format="[%m[/][.]%d[/][,]%y] [%H[:%M[:%S[.%N]]][%p][[(]%3Z[)]]]" time.out.format="%02m/%02d/%Y %02H:%02M:%02S.%03N" time.day.abb=c("Sun", "Mon", ..., "Sat") time.day.name=c("Sunday", "Monday", ..., "Saturday") time.month.abb=c("Jan", "Feb", ..., "Dec") time.month.name=c("January", "February", ..., "December") time.zone="GMT" tspan.in.format=paste("[%yy[ear[s]][,]] [%dd[ay[s]][,]]", "[%Hh[our[s]][,]] [%Mm[in[ute][s]][,]] [%Ss[ec[ond][s]][,]]", "[%NM[s][S]]") tspan.out.format="%dd %Hh %Mm %Ss %NMS", ts.eps=1e-5

Side Effects

When options are set, the options function changes a list named .splusTimeDateOptions in the splusTimeDate package. The components of .splusTimeDateOptions are all of the currently defined options. If timeDateOptions is called with either a list as the single argument or with one or more arguments in name=value form, the options specified are changed or created.

Details

The special options listed in this help file are driven by the object .splusTimeDateOptions. The timeDateOptions function provides the best and most convenient way to set and reset the components of this object. To set timeDateOptions temporarily in a function, call timeDateOptions as you normally would from the command line. (Note: This changes timeDateOptions on a global level in your session, and not simply in the frame of the function. To ensure that your function finishes cleanly and does not produce any side effects, use on.exit with the return value from your call to timeDateOptions.)

Examples

Run this code
timeDateOptions(time.zone="GMT")

Run the code above in your browser using DataLab