Learn R Programming

PairedData (version 0.5)

plotProfiles: Profiles plot

Description

Produce a profiles plot or before-after plot or 1-1 plot for paired data.

Usage

plotProfiles(df,condition1,condition2,subjects,groups=NULL,facet=TRUE,...)

Arguments

df
Data frame
condition1
name of the variable corresponding to measurements in the "first" condition
condition2
name of the variable corresponding to measurements in the "second" condition
subjects
name of the variable corresponding to subjects
groups
name of the variable corresponding to groups
facet
In case of groups, faceting (TRUE) or overplotting (FALSE)
...
Arguments to be passed to methods, such as graphical parameters (see par)

References

N.J. Cox. Speaking data: graphing agreement and disagreement. The Stata Journal, 4, 329-349, 2004.

See Also

plotCor, plotBA

Examples

Run this code
data(PrisonStress)
plotProfiles(df=PrisonStress,condition1="PSSbefore",condition2="PSSafter",subjects="Subject")
plotProfiles(df=PrisonStress,condition1="PSSbefore",condition2="PSSafter",subjects="Subject")+xlim("PSSbefore","PSSafter")
plotProfiles(df=PrisonStress,condition1="PSSbefore",condition2="PSSafter",subjects="Subject",groups="Group")+xlim("PSSbefore","PSSafter")
plotProfiles(df=PrisonStress,condition1="PSSbefore",condition2="PSSafter",subjects="Subject",groups="Group",facet=FALSE)+xlim("PSSbefore","PSSafter")

Run the code above in your browser using DataLab