as.list method | R Documentation |
Function to construct a list from a mondate.
## S3 method for class 'mondate'
as.list(x, ...)
x |
a |
... |
optional additional arguments to be passed to or from methods. |
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.
YE <- mondate.mdy(12, 31, 2011:2012)
sapply(YE, class) # "mondate" "mondate"
sapply(YE, month) # same as month(YE)
month(YE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.