compPlot {miscTools} | R Documentation |
Plot a scatterplot to compare two variables.
compPlot( x, y, lim = NULL, ... )
x |
values of the first variable (on the X axis). |
y |
values of the second variable (on the Y axis). |
lim |
optional vector of two elements specifying the limits of both axes). |
... |
further arguments are passed to |
Arne Henningsen
x <- rnorm( 25 ) y <- 2 + 3 * x + rnorm( 25 ) ols <- lm( y ~ x ) compPlot( y, fitted( ols ) ) compPlot( y, fitted( ols ), lim = c( -6, 10 ) ) compPlot( y, fitted( ols ), pch = 20 )