Description Usage Arguments Details
Subset a time table rows and columns by expression or indices, preserving time.table structure.
1 2 3 |
tt |
time.table to subset |
expr |
Expression evaluated within tt to subset the rows of tt |
vars |
Non-index/time columns to subset |
index |
data.table/data.frame containing indices or indices and times to subset |
times |
times within each index to subset (to not specify if index already contains times to extract!) |
preserve.frequency |
whether to preserve (or reguess) frequency information after subsetting |
Note that for now vars
*must* be a collection of
strings.
One can specify more than one of expr
, vars
,
and index
/time
, in which case the time.table
is first subset by index/time, then by expr and finally by
vars, meaning index/expr can rely on variables removed
after the subset. Note that this can result in unexpected
behaviour if expr evaluates to a vector of row numbers.
Furthermore both vars
and expr
can mention
extra columns in index/time (merged in the intermediate
data.table in the index
step).
If a column name exists in both tt
and
index
/time
then the name will referr to the
corresponding column of tt
*if* the column is to be
kept (i.e. it is in vars
), else it will refer to the
merged value from index
/time
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.