CreateConditionalFragment: Create a fragment based on a boolean condition (Deprecated)

Description Usage Arguments Examples

View source: R/fragment_conditional.R

Description

Return a single character value from a pre-defined set based on a corresponding set of conditions

Usage

1

Arguments

items

An unnamed list of character values in the desired order.

conditions

A list of boolean values corresponding to each value in items. When more than one value is true, the first is returned.

fallback

The character string to return when the list is empty or no conditions are met.

Examples

1
2
3
4
x <- 10
example_items <- list("an increase", "a decrease", "no change")
example_bool <- list(x > 0, x < 0, x == 0)
CreateConditionalFragment(example_items, example_bool)

polymathematic/Longform documentation built on Jan. 16, 2020, 10:12 p.m.