Learn R Programming

PairedData (version 1.1.1)

paired.plotProfiles: Profile plot

Description

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

Usage

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

Arguments

df

a data frame.

condition1

name of the variable corresponding to the second sample.

condition2

name of the variable corresponding to the first sample.

groups

names of the variable corresponding to groups (optional).

subjects

names of the variable corresponding to subjects.

facet

faceting or grouping strategy for plotting?

further arguments to be passed to methods.

Value

a graphical object of class ggplot.

References

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

See Also

plotBA,plotMcNeil

Examples

Run this code
# NOT RUN {
data(PrisonStress)
paired.plotProfiles(PrisonStress,"PSSbefore","PSSafter",subjects="Subject",groups="Group")

# Changing the line colour
paired.plotProfiles(PrisonStress,"PSSbefore","PSSafter")+geom_line(colour="red")
# }

Run the code above in your browser using DataLab