Univariate:
https://www.doc88.com/p-9347835360751.html
Missing Data
主要介绍的是feature plot的用法:
featurePlot(x, y, plot = if (is.factor(y)) “strip” else “scatter”,
labels = c(“Feature”, “”), …)
x为连续变量,或者连续变量的df
y为factor或者回归中的因变量
plot:
- 分类: box, strip, density, pairs or ellipse.
- 回归:pairs or scatter
分类:
featurePlot(x = iris[, 1:4],y = iris$Species,plot = "pairs")

featurePlot(x = iris[, 1:4],y = iris$Species,plot = "density",## Pass in options to xyplot() to## make it prettierscales = list(x = list(relation="free"),y = list(relation="free")),adjust = 1.5,pch = "|",layout = c(4, 1),auto.key = list(columns = 3))

回归:
library(mlbench)data(BostonHousing)regVar <- c("age", "lstat", "tax")str(BostonHousing[, regVar])theme1 <- trellis.par.get()theme1$plot.symbol$col = rgb(.2, .2, .2, .4)theme1$plot.symbol$pch = 16theme1$plot.line$col = rgb(1, 0, 0, .7)theme1$plot.line$lwd <- 2trellis.par.set(theme1)featurePlot(x = BostonHousing[, regVar],y = BostonHousing$medv,plot = "scatter",type = c("p", "smooth"),span = .5,layout = c(3, 1))

