Learn R Programming

PairedData (version 0.9.1)

plotMcNeil: Parallel lines plot

Description

Produce a parallel lines plot for paired data.

Usage

## S3 method for class 'paired':
plotMcNeil(object,groups=NULL,subjects=NULL,facet=TRUE,...)

Arguments

object
an object of class paired.
groups
factor corresponding to groups (optional).
subjects
vector corresponding to subjects (optional).
facet
faceting or grouping strategy for plotting?
...
arguments to be passed to methods.

Value

  • A graphical object of class ggplot.

References

D.R. McNeil. On graphing paired data. The American Statistician, 46 :307-310, 1992.

See Also

plotBA

Examples

Run this code
data(PrisonStress)
with(PrisonStress,plotMcNeil(paired(PSSbefore,PSSafter)))
with(PrisonStress,plotMcNeil(paired(PSSbefore,PSSafter),
groups=Group))

Run the code above in your browser using DataLab