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.
wine
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 <- "http://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)