View source: R/custom-chunks.R
custom | R Documentation |
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.
custom(report, ...)
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. |
All column names will be converted to lowercase. It is suggested you use lowercase when naming your custom columns to avoid confusion.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.