plot.xy.ab.p {mmodely} | R Documentation |
An x/y scatterplot with a linear regression line and p-value
Description
This function performs a simple scatter plot but also superimposses a linear regression trend (abline) and optionally also the p-value of this line
Usage
## S3 method for class 'xy.ab.p'
plot(x, x.var, y.var,
fit.line=TRUE, p.value=TRUE, slope=TRUE, p.col='red', plot.labels=TRUE, verbose=TRUE, ...)
Arguments
x |
a data frame |
x.var |
the name of the x variable in df |
y.var |
the name of the y variable in df |
fit.line |
should a fit (ab) line be drawn? |
p.value |
should the p-value be printed on the plot? |
slope |
should the slope be printed on the plot? |
p.col |
should the plot be labeled? |
plot.labels |
should all of thie model fit information be printed out? |
verbose |
should all other information be printed out too? |
... |
other parameters passed to 'plot' |
Value
An x/y scatterplot with regression line
Examples
path <- system.file("extdata","primate-example.data.csv", package="mmodely")
data <- read.csv(path, row.names=1)
plot.xy.ab.p(x=data, x.var='OC', y.var='group.size',
fit.line=TRUE, p.value=TRUE, slope=TRUE, p.col='red', plot.labels=TRUE, verbose=TRUE)
[Package mmodely version 0.2.5 Index]