Univariate:
    https://www.doc88.com/p-9347835360751.html
    image.png

    Missing Data
    image.png

    主要介绍的是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

    分类:

    1. featurePlot(x = iris[, 1:4],
    2. y = iris$Species,
    3. plot = "pairs")

    image.png

    1. featurePlot(x = iris[, 1:4],
    2. y = iris$Species,
    3. plot = "density",
    4. ## Pass in options to xyplot() to
    5. ## make it prettier
    6. scales = list(x = list(relation="free"),
    7. y = list(relation="free")),
    8. adjust = 1.5,
    9. pch = "|",
    10. layout = c(4, 1),
    11. auto.key = list(columns = 3))

    image.png
    回归:

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

    image.png