I would like to know, how I can combine my tables to create one bar plot. I first mutated and created new columns... but the answers are TRUE OR FALSE
master1 <- master %>%
mutate(underweight = BMI < 18.5,
normal = between(BMI, 18.5, 24.9),
overweight = between(BMI, 25, 29.9),
obese = between(BMI, 30, 34.9),
extreme = BMI > 35)
as I didn't know how to create from this table a bar plot, I splitted them in new tables:
t.underweight<-master1 %>%
filter(Income>0,underweight==TRUE) %>%
select(Income,underweight)
t.normal<-master1%>%
filter(Income>0,normal==TRUE)%>%
select(Income,normal)
t.overweight<-master1%>%
filter(Income>0,overweight==TRUE)%>%
select(Income,overweight)
t.obese<-master1%>%
filter(Income>0,obese==TRUE)%>%
select(Income,obese)
t.extreme<-master1%>%
filter(Income>0,extreme==TRUE)%>%
select(Income,extreme)
maybe there is an easier way to direct after mutating, if yes I would appreciate to learn how. if not how can I just combine this table to create a barplot? my second variable would be " Income " ... on the y-axis
