concept select() in category R

appears as: select()
Exploring Data with R

This is an excerpt from Manning's book Exploring Data with R.

  • select() — Pick variables by their names
  • The output table in the console shows that the order of columns is that which was specified in the select() call:

    # A tibble: 87 x 3
       gender species name             
       <chr>  <chr>   <chr>            
     1 male   Human   Luke Skywalker   
     2 NA     Droid   C-3PO            
     3 NA     Droid   R2-D2            
     4 male   Human   Darth Vader      
     5 female Human   Leia Organa      
     6 male   Human   Owen Lars        
     7 female Human   Beru Whitesun lars
     8 NA     Droid   R5-D4             
     9 male   Human   Biggs Darklighter
    10 male   Human   Obi-Wan Kenobi   
    # … with 77 more rows

    There are a handful of helper functions you can use within select():