topline_caption_multiselect: Generate a list of captions for multiple selection toplines

View source: R/apply_topline_multiselect.R

topline_caption_multiselectR Documentation

Generate a list of captions for multiple selection toplines

Description

This function is a helper for generating a list of captions given a patterns vector and a parent vector. The output of this function can then be passed to apply_topline_multiselect().

Usage

topline_caption_multiselect(patterns, parent)

Arguments

patterns

A character vector of "prefixes" for selecting columns in df.

parent

A logical vector of booleans indicating whether df has a parent response column.

Value

A list of character vectors that can be passed to apply_topline_multiselect() as its caption argument.

Examples


# Vector of patterns and parent
patterns <- c("prefix_1", "predix_2", ...)
parents <- c(TRUE, FALSE, ...)

# Captions list
captions <- topline_caption_multiselect(patterns, parents)


YangWu1227/citizenr documentation built on June 18, 2022, 12:17 p.m.