toSAS: Convert Timepoint to SAS Format

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Convert timepoint objects to SAS format for writing XPT files

Usage

1
2
3
4
5
6
## S3 method for class 'mDateTime'
toSAS(x, format="", format.info=NULL)
## S3 method for class 'mDate'
toSAS(x, format="", format.info=NULL)
## S3 method for class 'mTime'
toSAS(x, format="", format.info=NULL)

Arguments

x

subclass of timepoint

format

SAS format name

format.info

Table of SAS format information

Details

SASxport defines toSAS and calls it on each column when writing XPT files. The mDateTime method returns the integer number of seconds since the start of 1960-01-01. The mDate method returns the integer number of days since 1960-01-01.The mTime method returns the number of seconds since midnight.

Value

numeric

Author(s)

Tim Bergsma

References

http://metrumrg.googlecode.com

See Also

Examples

1
2
3
if(require(SASxport)) toSAS(as.mDateTime('1960-01-01 00:00')) # 0
if(require(SASxport)) toSAS(as.mDate('1960-01-02')) # 1
if(require(SASxport)) toSAS(as.mTime('00:01')) # 60

metrumrg documentation built on May 2, 2019, 5:55 p.m.