Learn R Programming

cg (version 0.9-5)

pointGraph.cgOneFactorData: Graph Individual Data Points in a cgOneFactorData object

Description

Create a point graph (a.k.a. dot plot, strip plot, one-dimensional scatter plot) of the data in a cgOneFactorData object.

Usage

## S3 method for class 'cgOneFactorData':
pointGraph(data, \dots)

Arguments

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

Value

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

concept

  • point graph
  • dot plot
  • strip plot

Details

If logscale=TRUE, the tick marks for the y-axis on the left side of the plot show original values, while the tick marks for the y-axis on the right side of the graph show base 10 log values. 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. Individual points are jittered, and open circles are used to alleviate potential overlap and the danger of representing multiple points as a single point. The point graph is a vertical dot plot or strip plot, with separate areas for each group in the data set, and light gray lines between the groups. For censored data, left-censored values are shown as a shallow "V", which is actually just a rotated downward "<" sign.="" similarly,="" right-censored="" values="" are="" shown="" as="" a="" deeper="" "^",="" which="" is="" rotated="" upward="" "="">" sign. The heading for the graph is taken from the cgOneFactorData object, which prepareCGOneFactorData sets from its analysisname argument. The label for the y-axis is taken from the cgOneFactorData object, which prepareCGOneFactorData sets from its endptname and endptunits arguments. The number of decimal places printed in the ticks on the y-axis is taken from the cgOneFactorData object, which prepareCGOneFactorData sets from its digits argument. The minimum and maximum values from the range of the data are respectively labeled in the bottom and top left corners of the graph region. If group labels along the x-axis seem to overlap in the standard horizontal form, they will be rotated 45 degrees.

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)
pointGraph(canine.data)

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

## Censored Data
data(gmcsfcens)
gmcsfcens.data <- prepareCGOneFactorData(gmcsfcens, format="groupcolumns",
                                         analysisname="cytokine",
                                         endptname="GM-CSF (pg/ml)",
                                         logscale=TRUE)
pointGraph(gmcsfcens.data)

Run the code above in your browser using DataLab