custom: Create custom output columns for a discovery engine...

View source: R/custom-chunks.R

customR Documentation

Create custom output columns for a discovery engine definition

Description

The report chunks that are listed in show_chunks provide high-level summarized views of entities, useful for quick spot-checking and basic ad-hoc reporting. In contrast, custom chunks are report chunks that are shaped by user-provided parameters (for instance, instead of getting lifetime giving summaries, you might want summarized giving for each of the past few years). See examples below.

Usage

custom(report, ...)

Arguments

report

Either a disco engine definition, or a partial report created by appending one or more chunks to a disco engine definition

...

named descriptions of custom columns to add to output. Add as many custom columns as necessary.

Note

All column names will be converted to lowercase. It is suggested you use lowercase when naming your custom columns to avoid confusion.

Examples

wealthy = has_capacity(1)

## lifetime giving summarized by area
wealthy %>%
  custom(business_giving = giving_to_area(business),
         athletics_giving = giving_to_area(athletics))

## use "flags" to create Yes/No columns. any disco engine definition
## can be used to create a flag:
environmental_interest = has_interest(environment)
wealthy %>%
  custom(environmnetalist = flag(environmental_interest))

flag


cwolfsonseeley/discoappend documentation built on March 17, 2022, 8:36 p.m.