Learn R Programming

cg (version 0.9-2)

comparisonsGraph: Graph comparisons specified amongst groups

Description

Generic function to create a Comparisons Graph based on a Comparisons Table created in turn by the cg package.

Usage

comparisonsGraph(compstable, cgtheme=TRUE, device="single",
                 wraplength=20, cex.comps=0.7, ...)

Arguments

compstable
A comparisonsTable object created by a comparisonsTable method from the cg package. The only class of object currently available is
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 vertical 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 2
cex.comps
Similar to wraplength, adjustment of this argument parameter can be made to fit the comparison labels on the left hand vertical axis.
...
Additional arguments, depending on the specific method written for the compstable object. Currently, there is only one such specific method; see comparisons

Value

  • The main purpose is the side effect of graphing to the current device. See the specific methods for discussion of any return values.

See Also

comparisonsGraph.cgOneFactorComparisonsTable

Examples

Run this code
data(canine)
canine.data <- prepareCGOneFactorData(canine, format="groupcolumns",
                                      analysisname="Canine",
                                      endptname="Prostate Volume",
                                      endptunits=expression(plain(cm)^3),
                                      digits=1, logscale=TRUE, refgrp="CC")
canine.fit <- fit(canine.data)

canine.comps1 <- comparisonsTable(canine.fit,  mcadjust=TRUE,
                                  type="allgroupstocontrol", refgrp="CC")

comparisonsGraph(canine.comps1)

Run the code above in your browser using DataLab