data_charts_prep: General function for processing general data

data_charts_prepR Documentation

General function for processing general data

Description

General function for processing general data

Usage

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
)

Arguments

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

Examples


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")


datasketch/dsvizprep documentation built on Feb. 11, 2023, 1:11 a.m.