library(mdsr)library(babynames)#This makes the Random_subsetRandom_subset <- babynames %>%filter(year=="2003"& name=="Bilal"& sex =="M"|year=="1999"& name=="Terria"& sex =="F"|year=="2010"& name=="Naziyah"& sex =="F"|year=="1989"& name=="Shawana"& sex =="F"|year=="1989"& name=="Jessi"& sex =="F"|year=="1928"& name=="Tillman"& sex =="M"|year=="1981"& name=="Leslee"& sex =="F"|year=="1981"& name=="Sherise"& sex =="F"|year=="1920"& name=="Marquerite"& sex =="F"|year=="1941"& name=="Lorraine"& sex =="M")
Below is how I would answer part a.
# I'll do the first one for you. There may be other solutions.Random_subset %>%filter( n>40& n<85)
# A tibble: 4 × 5
year sex name n prop
<dbl> <chr> <chr> <int> <dbl>
1 1928 M Tillman 43 0.0000377
2 1981 F Leslee 83 0.0000464
3 1989 F Shawana 41 0.0000206
4 2010 F Naziyah 45 0.0000230