mondate (version 0.10.01.02)

as.list method: Construct a list from a mondate

Description

Function to construct a list from a mondate.

Usage

"as.list"(x, ...)

Arguments

x
a mondate.
...
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

Run this code
YE <- mondate.mdy(12, 31, 2011:2012)
sapply(YE, class)    # "mondate" "mondate"
sapply(YE, month)   # same as month(YE)
month(YE)

Run the code above in your browser using DataCamp Workspace