Learn R Programming

PairedData (version 1.1.1)

plot: ~~ Methods for Function plot ~~

Description

Plot an object of class paired.

Usage

# S4 method for paired
plot(x, groups=NULL,subjects=NULL,

facet=TRUE,type=c("correlation","BA","McNeil","profile"),...)

Arguments

x

a paired object created by the paired function.

groups

a factor (optional).

subjects

subjects name.

facet

faceting or grouping strategy for plotting?

type

type of the plot (correlation, Bland-Altman, McNeil or profile plot).

arguments to be passed to methods.

Value

an graphical object of class ggplot.

Examples

Run this code
# NOT RUN {
data(HorseBeginners)
pd1<-with(HorseBeginners,paired(Actual,Imaginary))
plot(pd1)
plot(pd1,type="BA")
plot(pd1,type="McNeil")
plot(pd1,type="profile")

data(Shoulder)
with(Shoulder,plot(paired(Left,Right),groups=Group))
with(Shoulder,plot(paired(Left,Right),groups=Group,facet=FALSE))
with(Shoulder,plot(paired(Left,Right),
groups=Group,facet=FALSE,type="profile"))+theme_bw()
# }

Run the code above in your browser using DataLab