purchasePlot: Server-side code for purchase question plot.

Description Usage Arguments See Also

View source: R/intents_tab.R

Description

Server-side code for purchase question plot.

Usage

1
2
purchasePlot(input, output, session, fdat, pcol, scol, title, legend_title,
  bar_colors, pie_colors, plot_type, dropNA = FALSE)

Arguments

input

Required for shiny modules' server functions.

output

Required for shiny modules' server functions.

session

Required for shiny modules' server functions.

fdat

reactive, dataframe, filtered by demographic variables and product.

pcol

numeric, number of column in fdat containing plot's primary column of interest; shown in pie plots, height of bar plots.

scol

reactive, string, name of column in fdat containing plot's secondary column of interest; colouration of bar plots,

title

string, the title of the plot.

legend_title

string, the title of the bar plot's legend (describing scol).

bar_colors

vector, colours for bar plot (colours pcol options); strings (eg. c("#FF00FF", "#00FFFF", "00FF00")).

pie_colors

vector, colours for pie plot (colours scol options); strings (eg. c("#FF00FF", "#00FFFF", "00FF00")).

plot_type

string, indicator selecting between bar and pie plot ("Bar" or "Pie (%)").

dropNA

logical, whether to drop unknown/ NA / Decline to state values in pcol.

See Also

intents_by_awareness_bar, spc

Other intent plots: consumePlot, intentPlotUI, recommendPlot, regularPlot, replacePlot, similarPlot, whenPlot


IskanderBlue/morseldash documentation built on Oct. 30, 2019, 7:24 p.m.