vignettes/ExternaLSourceCode.R

#----starwars-plot
starwars %>% 
  filter(species == "Human") %>%
  ggplot() +
  aes(x=mass,
      y=height) +
  geom_point() + 
  stat_summary(fun.data=mean_cl_normal) + 
  geom_smooth(method='lm', formula= y~x)


#----starwars-tbl
starwars %>% 
  filter(species == "Human" | species == "Droid") %>%
  select(name,
         species,
         height,
         mass,
         homeworld) %>%
  knitr::kable()
mayurgpt07/DATA-598-WI20-week-5 documentation built on Feb. 25, 2020, 3:53 a.m.