Aan de slagGa gratis aan de slag

Exploring the IPEDS Data II

Most analyses require data wrangling. Luckily, there are many functions in the tidyverse that facilitate data frame cleaning. For example, the drop_na() function will remove observations with missing values. By default, drop_na() will check all columns for missing values and will remove all observations with one or more missing values.

miss_ex <- tibble(
             animal = c("dog", "cat", "rat", NA),
             name   = c("Woodruf", "Stryker", NA, "Morris"),
             age    = c(1:4))
miss_ex

miss_ex %>% 
     drop_na() %>% 
     arrange(desc(age))

# A tibble: 2 x 3
  animal    name   age
   <chr>   <chr> <dbl>
1    cat Stryker     2
2    dog Woodruf     1

Deze oefening maakt deel uit van de cursus

Interactive Maps with leaflet in R

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Remove colleges with missing sector information
ipeds <- 
    ipeds_missing %>% 
    ___()
Code bewerken en uitvoeren