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

wineR Documentation

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 categoric variable.

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

Usage

wine

Format

A data frame containing 178 observations of 13 variables.

Type

The type of wine, into one of three classes, 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

Source

The data was downloaded from the UCI Machine Learning Repository.

It was read as a CSV file with no header using read.csv. The columns were then given the appropriate names using colnames and the Type was transformed into a factor using as.factor. The compressed R data file was saved using save:

  UCI <- "https://archive.ics.uci.edu/ml"
  REPOS <- "machine-learning-databases"
  wine.url <- sprintf("
  wine <- read.csv(wine.url, header=FALSE) 
  colnames(wine) <- c('Type', 'Alcohol', 'Malic', 'Ash', 
                      'Alcalinity', 'Magnesium', 'Phenols', 
                      'Flavanoids', 'Nonflavanoids',
                      'Proanthocyanins', 'Color', 'Hue', 
                      'Dilution', 'Proline')
  wine$Type <- as.factor(wine$Type)
  save(wine, file="wine.Rdata", compress=TRUE)
  

References

Asuncion, A. & Newman, D.J. (2007). UCI Machine Learning Repository [https://www.ics.uci.edu/~mlearn/MLRepository.html]. Irvine, CA: University of California, School of Information and Computer Science.


rattle documentation built on March 21, 2022, 5:06 p.m.