plotPeriodGroupBars: Plot Bar Chart by Group Over Time

plotPeriodGroupBarsR Documentation

Plot Bar Chart by Group Over Time

Description

Plot Bar Chart by Group Over Time

Usage

plotPeriodGroupBars(df, groupVar, measureVar, periodVar, sortFirst, title,
  label, legendTitle, fun = mean, dp = 1, colorVector = c("gold",
  "orange"), ...)

Arguments

df

data frame or tibble.

groupVar

field name for groupping in df.

measureVar

field name of the measure in df.

periodVar

field name of the period in df.

sortFirst

value in periodVar. sort the bars with this value first.

title

chart's title.

label

label for measureVar.

fun

aggregate function; optional, default value is mean().

dp

number of decimal places; optional, default value is 1.

colorVector

character vector for setting the color of the bars; optional, default value is c("gold", "orange").

...

extra arguments go to geom_bar().

lagendTitle

title of the legend.

Value

a ggplot


maxleungtszchun/customerAnalytics documentation built on July 27, 2023, 9:24 a.m.