Combining-methods | R Documentation |
Methods to combine mondate
s.
cbindmondate(..., deparse.level = 1)
rbindmondate(..., deparse.level = 1)
## S3 method for class 'mondate'
rep(x, ...)
## S4 method for signature 'mondate'
c(x, ..., recursive = FALSE)
x |
a mondate |
deparse.level |
see |
recursive |
see |
... |
arguments passed to and from other methods |
The package calls setGeneric("c-rbind")
.
c-rbindmondate(...) |
The |
A mondate
(or a data.frame from
c-rbindmondate
when ... holds non-mondate
arguments).
For c
and rep
, a vector
.
c(x = "mondate", ...)
Combine mondate
s into a vector
.
...
any R object(s) that can
be coerced to a mondate
.
The behavior mimics that of the base
function.
The result will be a mondate
with properties equal to those of
x
.
rep(x = "mondate", ...)
Replicates a mondate
.
The behavior mimics that of the base
function.
See rep
for further details.
The result will be a mondate
with properties equal to those of
x
.
x <- mondate(1:6) # first 6 month-ends of the year 2000
c(x,x+6) # all month-ends of 2000
c(0,x) # result is "numeric", as determined by the first argument
M<-mondate.ymd(2001:2005,12,31) # 5 year-ends
names(M)<-LETTERS[1:5]
cbindmondate(M) # as a 5x1 matrix
rbindmondate(M,M)
begin_date <- M-12
cbindmondate(begin_date,end_date=M) # 5 pairs of year boundary-dates. Columns
# are "automatically" named in the default case
# (all mondates with timeunits="months").
dayt <- as.Date("2010-6-30")
cbindmondate(x,mondate(dayt)) # column names show as 'x' and blank
cbindmondate(x=x,DateColumn=mondate("2010-6-30")) # both columns are named
rep(mondate("2010-2-14"), 3)
(M<-seq(from=mondate("1/1/2010"),length=2)) # Jan. and Feb. 1st
rep(M,3) # three pairs
rep(M,each=3) # three Jan.'s, three Feb.'s
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.