comparisonsGraph {cg}R Documentation

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.
There is one class of objects that is currently available:
cgOneFactorComparisonsTable, which is prepared by the
comparisonsTable.cgOneFactorFit method.

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:

"single"

The default, which will put all graph panels on the same device page.

"multiple"

Relevant only when more than one panel of graphs is possible. In that case, a new graphics device is generated each newly generated single-paneled graph.

"ask"

Relevant only when more than one panel of graphs is possible. In that case, each are portrayed as a single-paneled graph, with the ask=TRUE argument specified in par so that user input confirmation is needed before the graphs are drawn.

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 20 characters before wrapping to a newline.

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
comparisonsGraph.cgOneFactorComparisonsTable for any additional arguments that can be specified.

Value

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

Note

Contact cg@billpikounis.net for bug reports, questions, concerns, and comments.

Author(s)

Bill Pikounis [aut, cre, cph], John Oleynick [aut], Eva Ye [ctb]

See Also

comparisonsGraph.cgOneFactorComparisonsTable

Examples

#### One Factor data

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)




[Package cg version 1.0-3 Index]