8.2 Selecting your variables

A dataframe with loads of variables can be unwieldy. Use the select() function to isolate the variables you need for your analysis.

  Study1 <- film %>%
    select(Title,Release,SubjectSex)

  head(Study1)
## # A tibble: 6 × 3
##   Title                 Release SubjectSex
##   <chr>                   <dbl> <chr>     
## 1 1987                     2014 Male      
## 2 American Sniper          2014 Male      
## 3 Big Eyes                 2014 Female    
## 4 Cesar Chavez             2014 Male      
## 5 Desert Dancer            2014 Male      
## 6 Digging Up the Marrow    2014 Male