as.list method {mondate} | R Documentation |
Construct a list from a mondate
Description
Function to construct a list from a mondate.
Usage
## S3 method for class 'mondate'
as.list(x, ...)
Arguments
x |
a |
... |
optional additional arguments to be passed to or from methods. |
Details
Constructs a list from a mondate object.
The length of the list equals the length of x
.
Each sublist contains an individual element of x
.
This method is most useful when a mondate is the X
argument
of one of the *apply
functions.
See an example of a recommended call to sapply
in "Examples" below.
Examples
YE <- mondate.mdy(12, 31, 2011:2012)
sapply(YE, class) # "mondate" "mondate"
sapply(YE, month) # same as month(YE)
month(YE)
[Package mondate version 1.0 Index]