| fmap_strata | R Documentation |
Companion to fmap_ranges for the stratified_range
format type. Each row pairs a stratum (e.g. study arm, subject id, or a
composite key produced by fputk()) with a numeric / Date /
POSIXct range and a label. The returned ks_fmap vector carries
the chosen sep as an attribute so that
fnew(type = "stratified_range") picks it up automatically.
fmap_strata(
stratum,
low,
high,
label,
inc_low = TRUE,
inc_high = FALSE,
sep = "|",
date_format = NULL
)
stratum |
Character vector of stratum identifiers. |
low, high |
Range bounds. See |
label |
Character vector of labels. |
inc_low, inc_high |
Logical, length 1 or |
sep |
Separator inserted between stratum and range key. Must match
the |
date_format |
Optional strptime format string. |
A ks_fmap object with an attached "strata_sep"
attribute.
fmap_ranges, fputk, fnew
visits <- fmap_strata(
stratum = c("ARM_A", "ARM_A", "ARM_B"),
low = c(0, 7, 0),
high = c(7, 14, 10),
label = c("Baseline", "Week 1", "Baseline")
)
fnew(visits, type = "stratified_range", range_subtype = "numeric",
name = "visit_window")
fputk(c("ARM_A", "ARM_B"), c(3, 5), format = "visit_window")
fclear()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.