assignment

rename the variables

adult<-read.csv("C:/Users/localadmin/Desktop/adult.csv")

adult=adult[,2:16]

colnames(adult)<-c("age","workclass","fnlwgt","education",
                   "education_num","marital_status","occupation",
                   "relationship","race","sex","capital_gain",
                   "capital_loss","hours_per_week",
                   "native_country","income")

View(adult)


adult1<-subset(adult,adult$education==" Bachelors"& adult$age<24)


adult2<-subset(adult,adult$income=="50K" & adult$income=="<=50K")


adult3<-subset(adult,adult$age > 20 & adult$income==">50K")

adult4<-subset(adult,adult$age<30|adult$income==">50k")

adult5<-subset(adult,adult$education=="Bachelors"& adult$age<24)

how many objcts above income>50k,income<50k

how many have age >20 andincome>50k

how many have age less than30 or income>50K

how many have education bachelors and age less than 24