collegeDistance <- read.csv("https://vincentarelbundock.github.io/Rdatasets/csv/AER/CollegeDistance.csv", header = TRUE)
highIncomeMale <- subset(collegeDistance,gender=="male" & income == "high")
highIncomeMale$state <-"New York"
highIncomeMale$state <-"New York"
highIncomeMale$city <-"Brooklyn"
# for all the education field  values that are 16, change the state field value to New Jersey.
highIncomeMale$state[highIncomeMale$education == 16]<-"New Jersey"