Learn R Programming

cg (version 1.0-2)

profileGraph.cgPairedDifferenceData: Graph Profiles of Experimental Unit Pairs in a cgPairedDifferenceData object

Description

Create a profile graph of the data in a cgPairedDifferenceData object.

Usage

## S3 method for class 'cgPairedDifferenceData':
profileGraph(data, \dots)

Arguments

...
Additional arguments, both optional. Two are currently valid: [object Object],[object Object]

Value

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

concept

profile

Details

The profile graph for paired difference data is the simplest of profiles as each experimental unit has exactly two points connected by a straight line. Labels for the experimental units are added for identification. Individual points are jittered, and open circles are used to alleviate potential overlap and the danger of representing multiple points as a single point. Tick marks are attempted to be chosen wisely. For log-scaled axes in particular, leading digits of 2, 5, and 10 for values are included if possible. Since the algorithm is empirical, the ticklabels argument is available for further refinement or complete replacement of tickmarks. The heading for the graph is taken from the cgPairedDifferenceData object, which prepareCGPairedDifferenceData sets from its analysisname argument. The label for the y-axis is taken from the cgPairedDifferenceData object, which prepareCGPairedDifferenceData sets from its endptname and endptunits arguments. The number of decimal places printed in the ticks on the y-axis is taken from the cgPairedDifferenceData object, which prepareCGPairedDifferenceData sets from its digits argument. Minimum and maximum values from ranges of data are respectively labeled in the bottom and top left corners of graph regions.

Examples

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

# Graph the data on the original scale instead of the log scale.
profileGraph(anorexiaFT.data, logscale=FALSE)

Run the code above in your browser using DataLab