Description Usage Arguments Value
View source: R/plot_formatting.R
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:
Creates a column of formatted percentages
Sums data across group members
Sets the positions for text that will be placed in a bar chart
1 2 3 4 | quik_prepare(df, dimension, measure, plot_type, groups,
facet_by, background,
currency, measure_unit, measure_decimal,
sum_label, text_cutoff)
|
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 ( |
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 |
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. |
Returns a new data frame with additional columns based on selections
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.