vizBySubgroup: Generates figures for 'Viz by Subgroup' tab

Description Usage Arguments Value See Also

View source: R/vizBySubgroup-plotFcns.R

Description

vizBySubgroup() is an internal function that takes a vector of covariate data, a vector of (binary) treatment assignments, and generates a plot.

Usage

1
2
vizBySubgroup(covarData, trt, covarName, plotHeight = 200, plotWidth = 300,
  trtColor = "#ffec5c", ctrlColor = "#e1315b", continuous)

Arguments

covarData

A vector of numeric covariate data to plot.

trt

A binary numeric vector that indicates each observation's treatment status (0 or 1).

covarName

A string that contains the name of the covariate being plotted (for annotating the plot).

plotHeight

A scalar integer that defines the height of the plot; passed to ggvis().

plotWidth

A scalar integer that defines the width of the plot; passed to ggvis().

trtColor

The color of treated observations in the bar chart. This argument is passed to ggvis() and can be any color specification that's acceptable by R (e.g., see here for more information).

ctrlColor

The color of control observations in the bar chart. This argument is passed to ggvis() and can be any color specification that's acceptable by R (e.g., see here for more information).

continuous

A logical scalar, indicating whether the provided data is from a continuous distribution.

Value

If both of the logical arguments are false, the output will be a plotly object containing an empty plot. Otherwise, the output will be a ggplot object containing the plot.

See Also

Other plotting functions: covarProfiles, forestPlotGen.fewGroups, forestPlotGen.manyGroups, forestPlot, groupQuantiles, subgroupProfiles, vizByCovar


sanoke/hetviz documentation built on March 4, 2020, 7:58 a.m.