Principal component analysis - understanding world cuisine
Food is a powerful symbol of who we are. There are many types of food identification, such as ethnic, religious, and class identifications. Ethnic food preferences become identity markers in the presence of gustatory foreigners, such as when one goes abroad, or when those foreigners visit the home shores.
Getting ready
In order to perform principal component analysis, we shall be using a dataset collected on the Epicurious recipe dataset.
Step 1 - collecting and describing data
The dataset titled epic_recipes.txt
shall be used. The dataset is in standard format.
How to do it...
Let's get into the details.
Step 2 - exploring data
The first step is to load the following packages:
   > install.packages("glmnet")    > library(ggplot2)    > library(glmnet)
Note
Version info: Code for this page was tested in R version 3.3.2 (2016-10-31)
Let's explore the data and understand the relationships among the variables. We'll begin by importing...