View source: R/getBoxPlotWithHighlightGroup.R
getBoxPlotWithHighlightGroup | R Documentation |
Plotly function to generate standard box and whisker plot with highighted groups
getBoxPlotWithHighlightGroup(
.data,
key,
group,
groupBaselineLabel,
value,
valueLabel,
text,
highlightGroup,
colors = c("#BBBDC0", "#287BA5"),
highlightColors = c("orange", "red"),
plotName
)
.data |
dataframe containing numeric values between 2 groups |
key |
dataframe key column |
group |
string - group column - should only contain 2 groups |
groupBaselineLabel |
string - value indicating the group label that should be used as the comparison |
value |
numeric - numeric value to compare between groups |
valueLabel |
string - column indicating the label for the .value values |
text |
string - column containing text values to show in tooltip |
highlightGroup |
string - column with highlight groups (A vs B or 1 vs 2 etc...) |
colors |
vector of colors to use for base boxplot and jitter - defaults to grey/blue. Color used for baseline should be passed as first value |
highlightColors |
vector of colors to use for highlighted points - defaults to orange/red |
plotName |
string - name to attribute to plot (used for tracking clicks, events, etc) |
returns plotly box and whisker plot with secondary traces indicating highlighted groups
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.