Learn R Programming

spinifex (version 0.3.2)

wine: The wine dataset from the UCI Machine Learning Repository.

Description

The wine dataset contains the results of a chemical analysis of wines grown in a specific area of Italy. Three types of wine are represented in the 178 samples, with the results of 13 chemical analyses recorded for each sample. The Type variable has been transformed into a categorical variable.

Usage

wine

Arguments

Format

A data frame of 178 observations of target class Type and 12 numeric variables:

  • Type, The type of wine, the target factor, 1 (59 obs), 2(71 obs), and 3 (48 obs).

  • Alcohol, Alcohol

  • Malic, Malic acid

  • Ash, Ash

  • Alcalinity, Alcalinity of ash

  • Magnesium, Magnesium

  • Phenols, Total phenols

  • Flavanoids, Flavanoids

  • Nonflavanoids, Nonflavanoid phenols

  • Proanthocyanins, Proanthocyanins

  • Color, Color intensity

  • Hue, Hue

  • Dilution, D280/OD315 of diluted wines

  • Proline, Proline

Details

The data contains no missing values and consist of only numeric data, with a three class target variable (Type) for classification.

Replicating this dataset:

require("rattle")
str(rattle::wine)
## save(wine, file = "./data/wine.rda")

Examples

Run this code
# NOT RUN {
library("spinifex")
str(wine)
dat <- scale_sd(wine[, 2:6])
clas <- wine$Type

bas <- basis_pca(dat)
mv <- manip_var_of(bas)
mt <- manual_tour(bas, mv)

ggt <- ggtour(mt, dat, angle = .2) +
  proto_default(aes_args = list(color = clas, shape = clas))
# }
# NOT RUN {
animate_plotly(ggt)
# }

Run the code above in your browser using DataLab