# The file used for data wrangling
collegeDistance <- read.csv("https://vincentarelbundock.github.io/Rdatasets/csv/AER/CollegeDistance.csv", header = TRUE)

# Creating and displaying a new data frame called "highIncomeMale". Below, I will display a subset of all males who have a high income. I will display the gender, income, and wage fields for the new subset.

highIncomeMale <- subset(collegeDistance,gender=="male" & income == "high",select=c(gender,income,wage))

#I will display the first twenty rows of the new data frame subset
head(highIncomeMale,20)
##     gender income wage
## 1     male   high 8.09
## 22    male   high 7.04
## 33    male   high 8.85
## 38    male   high 8.09
## 39    male   high 8.09
## 41    male   high 8.09
## 61    male   high 8.09
## 62    male   high 8.09
## 63    male   high 8.09
## 70    male   high 7.04
## 74    male   high 7.04
## 77    male   high 8.09
## 80    male   high 8.09
## 82    male   high 8.09
## 97    male   high 8.09
## 105   male   high 7.69
## 112   male   high 8.09
## 117   male   high 7.69
## 122   male   high 8.85
## 127   male   high 8.09