quik_prepare: Prep a data frame for ggquik plotting

Description Usage Arguments Value

View source: R/plot_formatting.R

Description

Sometimes plots need to modify data frame information in order to represent it in a visual format. quik_prepare takes a data frame, and optionally:

Usage

1
2
3
4
quik_prepare(df, dimension, measure, plot_type, groups, 
                       facet_by, background,
                       currency, measure_unit, measure_decimal,
                       sum_label, text_cutoff)

Arguments

df

The data frame containing plot data

dimension

The column containing the values to compare across (e.g. quarters, types)

measure

The data frame column with the numerical values to plot

plot_type

A string. The type of plot ("bar" or "line").

groups

The column containing the different groups of bars, lines, or points.

facet_by

The data frame column with the facet data (if necessary).

background

A logical. Is a background total necessary?

currency

A string, usually $

measure_unit

A string. Can be %, K, or M

measure_decimal

An integer. The number of decimal places to show.

sum_label

Will there be a special group label? Sum from which column?

text_cutoff

A number. If text values below a certain number should not be included.

Value

Returns a new data frame with additional columns based on selections


brascoball/ggquik documentation built on Feb. 14, 2021, 5:17 p.m.