plot: ~~ Methods for Function 'plot' ~~

Description Usage Arguments Value Examples

Description

Plot an object of class paired.

Usage

1
2
3
4
## S4 method for signature '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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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()

Example output

Loading required package: MASS
Loading required package: gld
Loading required package: mvtnorm
Loading required package: lattice
Loading required package: ggplot2

Attaching package: 'PairedData'

The following object is masked from 'package:base':

    summary

PairedData documentation built on May 1, 2019, 6:49 p.m.