| rp.ancova | R Documentation |
This function plots a response variable against a covariate, with different groups of data identified by colour and symbol. It also creates a panel which controls the model which is fitted to the data and displayed on the plot.
The function is superseded by rp.lm which is strongly recommended as it has a more flexible interface and improved plotting, using ggplot.
rp.ancova(x, y, group, panel = TRUE, panel.plot = TRUE, model = NA,
xlab, ylab, glab, hscale = NA, vscale = hscale, style = 'ggplot')
x |
a vector of covariate values. |
y |
a vector of response values. |
group |
a vector of group indicators. If this is not already a factor it will be converted into one. |
panel |
a logical variable which determines whether a panel is created to allow interactive control of the fitted models. |
panel.plot |
a logical parameter which determines whether the plot is placed inside the panel (TRUE) or the standard graphics window (FALSE) |
model |
a character variable which determines the model to be fitted. Valid values are |
xlab |
a character variable used for the covariate axis label. |
ylab |
a character variable used for the response axis label. |
glab |
a character variable used for the group variable label. |
hscale, vscale |
scaling parameters for the size of the plot when |
style |
a character variable used to determine whether the style of the plot. When this is set to |
The rp.lm function provides an alternative means of creating the display, based on model formulae.
The 'ggplot' style is strongly recommended as in this case the rp.lm function is called. The older style of display has very limited functionality.
Static plots, for printing or other purposes can be created by setting the panel argument to FALSE and specifying the model of interest.
Nothing is returned.
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
## Not run:
with(gullweight, {
rp.ancova(hab, weight, month)
})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.