as.data.frame method | R Documentation |
Function to coerce a mondate for containment in a data.frame.
## S3 method for class 'mondate'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
x |
a |
row.names |
|
optional |
logical.
See |
... |
optional additional arguments to be passed to or from methods. |
Although users would normally call data.frame
,
the as.data.frame
function is the underlying workhorse that
enables a mondate
to be stored in a data.frame
.
When array-shaped mondates are stored,
the number of rows is retained and if the dimension > 2 it is
"flattened" in the
usual data.frame
sense.
The mondate
method is fashioned after
the as.data.frame.Date
method.
data.frame
,
as.data.frame
,
format
YE <- mondate.mdy(12, 31, 2001:2005)
data.frame(yearend = YE, value = 1000 * 1.05^(1:5)) # 5% annual inflation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.