Multivariate gegevens plotten

Multivariate kansverdelingen in R

Surajit Ray

Professor, University of Glasgow

Verschillende plotopties

 

  • Basisplot in R
  • Bibliotheek lattice
  • ggplot
  • 3D-plotopties
Multivariate kansverdelingen in R

Basis R-plot voor multivariate data

pairs(iris_raw[, 1:4])

pairs-plot

  • Minder bruikbaar met veel variabelen
Multivariate kansverdelingen in R

Pairs-plot met kleur

pairs(iris_raw[, 1:4], col = iris_raw$Species)

pairs-plot per soort

Multivariate kansverdelingen in R

Lattice

library(lattice)
splom(~iris_raw[, 1:4], col = iris_raw$Species, pch = 16)

Multivariate kansverdelingen in R

Met ggplot

library(ggplot2)
library(GGally)
ggpairs(data = iris_raw, columns = 1:4, mapping = aes(color = Species))

ggplot

Multivariate kansverdelingen in R

3D-plots

library(scatterplot3d)
scatterplot3d(iris_raw[, c(1, 3, 4)], color = as.numeric(iris_raw$Species))

3d

Multivariate kansverdelingen in R

3D-plots

scatterplot3d(iris_raw[, c(1, 3, 4)], color = as.numeric(iris_raw$Species),pch = 4, angle = 80)

3d-wijziging

Multivariate kansverdelingen in R

Laten we wat plotten met de wijngegevens!

Multivariate kansverdelingen in R

Preparing Video For Download...