MappedDataBoxplot
MappedDataBoxplot.RdR6 class for mapping variable to data for boxplot visualizations. This class extends MappedData to provide specialized mapping functionality for box-and-whisker plots, including handling of discrete and continuous x-axis scales and automatic grouping logic.
See also
Other MappedData classes:
MappedData,
MappedDataRangeDistribution,
MappedDataTimeProfile
Super class
ospsuite.plots::MappedData -> MappedDataBoxplot
Public fields
xscalescale of x axis
xscale.argsarguments for scale of x axis
hasXmappingboolean, if TRUE x is mapped
Methods
Method new()
Create a new MappedDataBoxplot object
Usage
MappedDataBoxplot$new(
data,
mapping,
groupAesthetics = NULL,
direction = "y",
isObserved = TRUE,
xlimits = NULL,
ylimits = NULL,
xscale = AxisScales$linear,
yscale = AxisScales$linear,
residualScale = NULL,
residualAesthetic = "y"
)Arguments
datadata.frame used for mapping
mappinglist of aesthetic mappings
groupAestheticsvector of aesthetics, which are used for columns mapped with aesthetic
groupbydirectiondirection of plot either "x" or "y"
isObservedA
booleanif TRUE mappings mdv, lloq, error and error_relative are evaluatedxlimitslimits for x-axis (may be NULL)
ylimitslimits for y-axis (may be NULL)
xscalescale of x-axis either 'linear' or 'log'
yscalescale of y-axis either 'linear' or 'log'
residualScalescale of x residuals
residualAestheticaesthetic used for mapping residuals
Method doAdjustmentsWithMetaData()
Arguments
originalmappingmapping provided by user
xscaleeither 'linear','log', 'discrete' or 'auto' (default) auto select linear for continuous data and discrete for categorical data
xscale.argslist of arguments passed to
ggplot2::scale_x_continuous(),ggplot2::scale_x_log10()orggplot2::scale_x_discrete()
Examples
if (FALSE) { # \dontrun{
# Create boxplot mapping with continuous x variable
boxplotData <- MappedDataBoxplot$new(
data = myDataFrame,
mapping = aes(x = dose, y = concentration),
xscale = "linear"
)
# Create boxplot mapping with categorical x variable
boxplotData <- MappedDataBoxplot$new(
data = myDataFrame,
mapping = aes(x = treatment_group, y = response),
xscale = "discrete"
)
} # }