Description Usage Arguments Value
a long dataset (repeated measures within id) with a qualitative code (metric id) and its coresponding value will be reduced to just the last value of any set of codes before the deadline (index date)
1 2 3 4 5 6 7 8 9 10 | observe.last(
data,
id,
index.date,
code,
value,
interval,
valid.codes,
text = F
)
|
data |
a data frame with a 'date' column, an index.date column, an id column, a code (metric id) column and a value column to be reduced to one row per id with the latest observation of any valid code. |
id |
name of id column. |
index.date |
name of index date column |
code |
name of column containing the metric id (when several metrics are just stacked in a long dataframe) |
value |
name of column with actual value corresponding to the label of metric contained in the code column |
valid.codes |
optional list of valid codes to weed out irrelevant measures |
text |
a boolean indicator of whether values are categorical / contains letters. |
intervel |
the limits of an interval expressed as integer days relative to the index date |
a data frame with one row per id and columns with counts of input vars within interval
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.