dlab-berkeley / R-Fundamentals

D-Lab's 4 part, 8 hour introduction to R Fundamentals. Learn how to create variables and functions, manipulate data frames, make visualizations, use control flow structures, and more, using R in RStudio.
34 stars 9 forks source link

Key for lesson 3 needs to be updated (typo) #21

Closed leahhrlee closed 10 months ago

leahhrlee commented 11 months ago

fill in a conditional statement in filter to keep only rows with non-missing values of gdpPercap

gap_nomissing <- gap %>% filter(!is.na(gdpPercapita))

gdpPercapita should be gdpPercap

So updated should be:

gap_nomissing <- gap %>% filter(!is.na(gdpPercap))