filter.decorated: Filter Decorated

Description Usage Arguments Value See Also Examples

View source: R/singularity.R

Description

Filters a decorated data.frame. After a filter operation, promote() is called to see if ambiguous conditional attributes can be improved.

Usage

1
2
3
4
5
6
7
## S3 method for class 'decorated'
filter(
  .data,
  ...,
  .preserve = FALSE,
  .promote = getOption("yamlet_promote", TRUE)
)

Arguments

.data

passed to filter

...

passed to filter

.preserve

passed to filter

.promote

whether to auto-promote plural attributes

Value

decorated

See Also

Other promote: [.decorated(), promote.data.frame(), promote.list(), promote(), singularity()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

yamlet documentation built on July 19, 2021, 1:06 a.m.