Learn R Programming

clinDataReview (version 1.6.2)

addLayerToScatterPlot: Helper function to add layer to scatter plot

Description

Helper function to add layer to scatter plot

Usage

addLayerToScatterPlot(
  gg,
  aesVar,
  pars,
  generalPars,
  layerFunction,
  useHandlers = FALSE
)

Value

ggplot object

Arguments

gg

ggplot object

aesVar

layers specific aesthetics list of layer specific aesthetics

pars

list of parameters specific to the layer aes

generalPars

overall, not layer specific parameters can be overwritten by pars

layerFunction

function to use for adding the layer e.g. geom_line

useHandlers

if TRUE we use handlers to repress the expected warning: Hover is set via the 'text' aesthetic in ggplot, we need to pass this aesthetic to have it available in plotly even though it is not used by geom_point. Defaults to FALSE

Author

Adriaan Blommaert Laure Cougnaud