Learn R Programming

superb (version 0.9.4.2)

superbPlot.bar: superbPlot templates

Description

superbPlot comes with a few built-in templates for for making the final plots. All produces ggplot objects that can be further customized. Additionally, it is possible to add custom-make templates (see vignette 6). The functions, to be "superbPlot-compatible", must have these parameters:

If you have useful styles, do contribute github.com/dcousin3/superb by opening an issue. Finally, any number of optional list of parameters with default value set to list() can be provided depending on the template style. These includes errorbarParams, pointParams, barParams, etc.

Usage

superbPlot.bar(
  summarydata,
  xvar,
  groupingfac,
  addfactors,
  Debug = FALSE,
  rawdata = NULL,
  barParams = list(),
  errorbarParams = list(),
  facetParams = list()
)

Arguments

summarydata

a data.frame with columns "center", "lowerwidth" and "upperwidth" for each level of the factors;

xvar

a string with the name of the column where the factor going on the horizontal axis is given;

groupingfac

a string with the name of the column for which the data will be grouped on the plot;

addfactors

a string with up to two additional factors to make the rows and columns panels, in the form "fact1 ~ fact2";

Debug

a boolean to display or not debugging information

rawdata

always contains "DV" for each participants and each level of the factors

barParams

(optional) list of graphic directives that are sent to the geom_bar layer

errorbarParams

(optional) list of graphic directives that are sent to the geom_errorbar layer

facetParams

(optional) list of graphic directives that are sent to the facet_grid layer

Value

a ggplot object