LoslegenKostenlos loslegen

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

Diese Übung ist Teil des Kurses

Interactive Maps with leaflet in R

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Remove colleges with missing sector information
ipeds <- 
    ipeds_missing %>% 
    ___()
Code bearbeiten und ausführen