Description Usage Arguments Examples
Subset a visreg object so that only a portion of the full model is plotted.
1 2 |
x |
A |
sub |
Logical expression indicating elements to keep, as in
|
... |
Not used. |
1 2 3 4 5 6 7 8 9 10 11 12 | # Fit a model and construct a visreg object
airquality$Heat <- cut(airquality$Temp,3,labels=c("Cool","Mild","Hot"))
fit <- lm(Ozone~ Solar.R + Wind*Heat,data=airquality)
v <- visreg(fit, "Wind", by="Heat", plot=FALSE)
# Plot only certain levels
vv <- subset(v, Heat %in% c("Cool", "Hot"))
plot(vv)
# Plot only up to wind 15 mph
vv <- subset(v, Wind < 15)
plot(vv)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.