data_charts_prep | R Documentation |
General function for processing general data
data_charts_prep( data, ftype, agg, plot, color_by = NULL, ptage = FALSE, ptage_col = NULL, drop_na = FALSE, na_label = "na", drop_na_legend = TRUE, sort_opts = NULL, slice_n = NULL, palette = NULL, highlight_value = NULL, highlight_value_color = NULL, order_legend = NULL, order = NULL, label_wrap_legend = NULL, label_wrap = NULL, scatter_opts = NULL, group_extra_num = TRUE )
data |
A data frame. |
ftype |
A string value with type of data to be plotted |
agg |
Statistics which can be applied to all data subsets (sum, mean, median) |
color_by |
A character with the name of the variable by which you want to color the graph. Default is NULL |
ptage_col |
A string value with the name of the categorical variable against which the percentage is calculated. |
group_extra_num |
A logical indicating |
df <- sample_data("Cat-Num") data_charts_prep(data = df, ftype = "Cat-Num". agg = "sum") df <- sample_data("Cat-Cat-Num") data_charts_prep(data = df, ftype = "Cat-Cat-Num", agg = "mean")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.