filter.decorated | R Documentation |
Filters a decorated data.frame. After a filter operation, promote() is called to see if ambiguous conditional attributes can be improved.
## S3 method for class 'decorated'
filter(
.data,
...,
.preserve = FALSE,
.promote = getOption("yamlet_promote", TRUE)
)
.data |
passed to |
... |
passed to |
.preserve |
passed to |
.promote |
whether to auto-promote plural attributes |
decorated
Other promote:
[.decorated()
,
promote.data.frame()
,
promote.list()
,
promote()
,
singularity()
library(magrittr)
file <- system.file(package = 'yamlet', 'extdata','phenobarb.csv')
x <- file %>% decorate
# Note that there are two elements each for value label and value guide.
x %>% decorations(event, value)
# Filtering promotes the relevant conditional attributes automatically.
x %>% filter(event == 'dose') %>% decorations(value)
x %>% filter(event == 'conc') %>% decorations(value)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.