BaşlayınÜcretsiz Başlayın

Exploring variables with tidyverse tools

Once loaded, your dataset of Census or ACS variables might contain thousands of rows. In RStudio, it is recommended to use the View() function to interactively search for these variables. Outside of RStudio, these datasets can be browsed using tidyverse filtering tools.

Bu egzersiz

Analyzing US Census Data in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Load the tidyverse package.
  • Filter the v16 data frame for variables in table B19001 by using the str_detect() function.
  • Use the string "public transportation" to search for public transportation-related variables.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Load the tidyverse
library(___)

# Filter for table B19001
filter(v16, ___(name, "___"))

# Use public transportation to search for related variables
filter(v16p, ___(label, fixed("___", 
                                ignore_case = TRUE)))
Kodu Düzenle ve Çalıştır