superbPlot.circularpoint: superbPlot 'circularpoint' layout

View source: R/functionsPlotting_circular.R

superbPlot.circularpointR Documentation

superbPlot 'circularpoint' layout

Description

superb comes with a few circular layouts for making plots. It produces ggplot objects that can be further customized.

It has these parameters:

Usage

superbPlot.circularpoint(
  summarydata,
  xfactor,
  groupingfactor,
  addfactors,
  rawdata = NULL,
  pointParams = list(),
  errorbarParams = list(),
  facetParams = list(),
  radarParams = list(),
  xAsFactor = TRUE
)

Arguments

summarydata

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

xfactor

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

groupingfactor

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";

rawdata

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

pointParams

(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_superberrorbar layer

facetParams

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

radarParams

(optional) list of arguments to the radar coordinates (seel coord_radial() ).

xAsFactor

(optional) Boolean to indicate if the factor on the horizontal should continuous or discrete (default is discrete)

Value

a ggplot object

Examples

# This will make a plot with bars
superb(
   len ~ dose + supp, 
   ToothGrowth, 
   plotStyle="circularpoint" 
)

# if you extract the data with superbData, you can 
# run this layout directly
#processedData <- superb(
#   len ~ dose + supp,
#   ToothGrowth, 
#   showPlot = FALSE
#)
#
#superbPlot.circularpoint(processedData$summaryStatistic,
#   "dose",
#   "supp",
#   ".~.",
#   processedData$rawData)


dcousin3/superb documentation built on Oct. 29, 2024, 5:28 p.m.