starwars <- read_csv("https://bcdanl.github.io/data/starwars.csv")Let’s analyze the starwars data:
rmarkdown::paged_table(starwars) Variable Description for starwars data.frame
The following describes the variables in the starwars data.frame.
filmsList of films the character appeared innameName of the characterspeciesName of speciesheightHeight (cm)massWeight (kg)hair_color,skin_color,eye_colorHair, skin, and eye colorsbirth_yearYear born (BBY = Before Battle of Yavin)sexThe biological sex of the character, namely male, female, hermaphroditic, or none (as in the case for Droids).genderThe gender role or gender identity of the character as determined by their personality or the way they were programmed (as in the case for Droids).homeworldName of homeworld
Human vs. Droid
ggplot(data =
starwars %>%
filter(species %in% c("Human", "Droid"))) +
geom_boxplot(aes(x = species, y = mass,
fill = species),
show.legend = FALSE)