x <- c(1, 3, 5)

x %in% c(1, 2, 3, 4)

library(dplyr)

head(murders)

murders_new,-mutate(murders, rate_murders= total/population*100000)

head(murders_new)

murders2<-filter(murders_new,rate_murders<=0.7) murders2

library(dslabs) data(heights)

tall_males <- heights\(sex=="Male" & heights\)height>70 head(tall_males)

library(ggplot2) library(dplyr) library(dslabs) data(heights)

heights%>%ggplot(aes(sex,fill=sex))+geom_bar()

heights%>%ggplot(aes(sex,height,fill=sex))+geom_boxplot() +scale_fill_manual(values=c(“white”,“red”))

s<-heights %>%filter(sex==“Female”)%>% summarize(average=mean(height),standard_deviation=sd(height)) s

s\(average s\)standard_deviation str(s)

library(ggplot) table(heights$sex) heights%>%ggplot(aes(sex,fill=sex))+geom_bar() heights%>%count(sex)%>%mutate(proportion=n/sum(n))