| subset {fCalendar} | R Documentation |
A collection and description of functions and methods for subsetting 'timeDate' objects.
[.timeDate | Extracts or replaces subsets from 'timeDate' objects, |
window.timeDate | Extracts a piece from a 'timeDate' object, |
cut.timeDate | A synonyme for the window function, |
start.timeDate | Extracts the first entry of a 'timeDate' object, |
end.timeDate | Extracts the last entry of a 'timeDate' object, |
length.timeDate | Gets the length of a 'timeDate' object, |
blockStart | Creates start dates for equally sized blocks, |
blockEnd | Creates end dates for equally sized blocks. |
## S3 method for class 'timeDate': x[..., drop = TRUE] ## S3 method for class 'timeDate': window(x, start , end, ...) ## S3 method for class 'timeDate': cut(x, from , to, ...) ## S3 method for class 'timeDate': start(x, ...) ## S3 method for class 'timeDate': end(x, ...) ## S3 method for class 'timeDate': length(x) blockStart(x, block = 20) blockEnd(x, block = 20)
block |
an integer value specifying the length in number of records for numerically sized blocks of dates. |
drop |
["["] - a logical flag, by default TRUE.
|
from, to |
[cut] - starting date, required, and end date, ptional. If supplied to must be after from.
|
start, end |
[window] - starting date, required, and end date, ptional. If supplied to must be after from.
|
x |
an object of class timeDate.
|
... |
arguments passed to other methods. |
All functions return an object of class "timeDate".
The function [.timeDate extracts or replaces subsets,
the function cut extracts a piece,
the functions start and end extract the first and last
element,
the functions blockStart and blockEnd create vectors of
start and end values for equally sized blocks.
timeDate.
We also recommend to inspect the help pages for the POSIX time and date
class, ?Dates, and the help pages from the contributed R packages
chron and date.
## Dates in April, currentYear:
tS = timeSequence(
from = paste(currentYear, "-03-01", sep = ""),
to = paste(currentYear, "-04-30", sep = ""))
tS
## [ - Subsetting First Five Days:
tS[1:5]
## Subset Start and End Date:
c(start(tS), end(tS))