# Reads the full data set, including numerical and categorical variables and labels cereal_data_full <- read.csv(file="http://people.stat.sc.edu/hitchcock/cereal_new.csv",header=T) # Creates a data set called cereal_numeric that contains 9 numeric variables measured on each cereal: cereal.numeric <- cereal_data_full[,4:12] # attaches the data frame so that we can refer to each column directly: attach(cereal.numeric) # creates a variable called rating that is a subjective "quality rating" of the cereal (presumably by a Consumer Reports expert): rating <- cereal_data_full$rating #creates vector of labels: cereal_name <- cereal_data_full$name # creates a categorical variable for the company that manufactures the cereal: manufacturer <- cereal_data_full$manuf # creates a categorical variable that categorizes the cereals as either 'hot' or 'cold' cereal_type <- cereal_data_full$type