Learn R Programming

cg (version 1.0-2)

comparisonsGraph.cgPairedDifferenceComparisonsTable: Create an graph of the comparisons in a cgPairedDifferenceComparisonsTable object

Description

Creates a graph to see comparisons in a cgPairedDifferenceComparisonsTable object

Usage

## S3 method for class 'cgPairedDifferenceComparisonsTable':
comparisonsGraph(compstable,
cgtheme=TRUE, device="single", wraplength = 20, cex.comps = 0.7, ...)

Arguments

cgtheme
When set to the default TRUE, ensures a trellis device is active with limited color scheme. Namely, background, strip.shingle, and strip.background are each set to "white".
device
Can be one of three values: [object Object],[object Object],[object Object]
wraplength
On the left hand axis are each A vs. B comparison label from the compstable object. An attempt at sensible formatting when a newline is needed is made, but adjustment by this argument may be needed. The default is 20
cex.comps
Similar to wraplength, adjustment of this argument parameter can be made to fit the comparison labels on the left hand axis.
...
Additional arguments. Two are currently valid: [object Object],[object Object]

Value

  • comparisonsGraph.cgPairedDifferenceComparisonsTable returns an invisible NULL. The main purpose is the side effect of graphing to the current device.

Details

The minimum and maximum values across the bar ends are added inside the plot region in blue, flush against the x-axis. The number of decimal places are determined by the digits and endptscale values in the compstable@settings slot.

See Also

cgPairedDifferenceComparisonsTable

Examples

Run this code
data(anorexiaFT)
anorexiaFT.data <- prepareCGPairedDifferenceData(anorexiaFT, format="groupcolumns",
                                                 analysisname="Anorexia FT",
                                                 endptname="Weight",
                                                 endptunits="lbs",
                                                 expunitname="Patient",
                                                 digits=1,
                                                 logscale=TRUE)
anorexiaFT.fit <- fit(anorexiaFT.data)

anorexiaFT.comps0 <- comparisonsTable(anorexiaFT.fit)
anorexiaFT.comps1 <- comparisonsTable(anorexiaFT.fit,  model="olsonly", display="none")

comparisonsGraph(anorexiaFT.comps0)
comparisonsGraph(anorexiaFT.comps1)

Run the code above in your browser using DataLab