Learn R Programming

PairedData (version 0.5)

plotCor: Correlation plot

Description

Produce a correlation plot for paired data with a 45 degrees reference line.

Usage

plotCor(df,condition1,condition2,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
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)

See Also

plot

Examples

Run this code
data(PrisonStress)
plotCor(df=PrisonStress,condition1="PSSbefore",condition2="PSSafter")
plotCor(df=PrisonStress,condition1="PSSbefore",condition2="PSSafter",groups="Group")
plotCor(df=PrisonStress,condition1="PSSbefore",condition2="PSSafter",groups="Group",facet=FALSE)

Run the code above in your browser using DataLab