Import data
## # A tibble: 2,973 × 10
## name state state_code type degree_length room_and_board in_state_tuition
## <chr> <chr> <chr> <chr> <chr> <chr> <dbl>
## 1 Aaniiih… Mont… MT Publ… 2 Year NA 2380
## 2 Abilene… Texas TX Priv… 4 Year 10350 34850
## 3 Abraham… Geor… GA Publ… 2 Year 8474 4128
## 4 Academy… Minn… MN For … 2 Year NA 17661
## 5 Academy… Cali… CA For … 4 Year 16648 27810
## 6 Adams S… Colo… CO Publ… 4 Year 8782 9440
## 7 Adelphi… New … NY Priv… 4 Year 16030 38660
## 8 Adirond… New … NY Publ… 2 Year 11660 5375
## 9 Adrian … Mich… MI Priv… 4 Year 11318 37087
## 10 Advance… Virg… VA For … 2 Year NA 13680
## # ℹ 2,963 more rows
## # ℹ 3 more variables: in_state_total <dbl>, out_of_state_tuition <dbl>,
## # out_of_state_total <dbl>
Apply the following dplyr verbs to your data
Filter rows
## # A tibble: 21 × 10
## name state state_code type degree_length room_and_board in_state_tuition
## <chr> <chr> <chr> <chr> <chr> <chr> <dbl>
## 1 Colby-S… New … NH Priv… 4 Year 14264 42398
## 2 Dartmou… New … NH Priv… 4 Year 15756 55453
## 3 Frankli… New … NH Priv… 4 Year 13345 36900
## 4 Granite… New … NH Publ… 4 Year NA 9645
## 5 Great B… New … NH Publ… 2 Year NA 7200
## 6 Keene S… New … NH Publ… 4 Year 11026 14212
## 7 Lakes R… New … NH Publ… 2 Year NA 6720
## 8 Manches… New … NH Publ… 2 Year NA 7050
## 9 Nashua … New … NH Publ… 2 Year NA 7140
## 10 New Eng… New … NH Priv… 4 Year 14222 37914
## # ℹ 11 more rows
## # ℹ 3 more variables: in_state_total <dbl>, out_of_state_tuition <dbl>,
## # out_of_state_total <dbl>
Arrange rows
## # A tibble: 2,973 × 10
## name state state_code type degree_length room_and_board in_state_tuition
## <chr> <chr> <chr> <chr> <chr> <chr> <dbl>
## 1 Columbi… New … NY Priv… 4 Year 14016 59985
## 2 Univers… Illi… IL Priv… 4 Year 16350 58230
## 3 Columbi… New … NY Priv… 4 Year 14190 57549
## 4 Vassar … New … NY Priv… 4 Year 13550 56960
## 5 Trinity… Conn… CT Priv… 4 Year 14750 56910
## 6 Harvey … Cali… CA Priv… 4 Year 18127 56876
## 7 Landmar… Verm… VT Priv… 2 Year 11840 56800
## 8 Frankli… Penn… PA Priv… 4 Year 14050 56750
## 9 Amherst… Mass… MA Priv… 4 Year 14740 56426
## 10 School … Mass… MA Priv… 4 Year 14560 56382
## # ℹ 2,963 more rows
## # ℹ 3 more variables: in_state_total <dbl>, out_of_state_tuition <dbl>,
## # out_of_state_total <dbl>
## # A tibble: 2,973 × 10
## name state state_code type degree_length room_and_board in_state_tuition
## <chr> <chr> <chr> <chr> <chr> <chr> <dbl>
## 1 Aaniiih… Mont… MT Publ… 2 Year NA 2380
## 2 Academy… Minn… MN For … 2 Year NA 17661
## 3 Advance… Virg… VA For … 2 Year NA 13680
## 4 Aiken T… Sout… SC Publ… 2 Year NA 5160
## 5 Aims Co… Colo… CO Publ… 2 Year NA 2281
## 6 Alabama… Alab… AL Publ… 2 Year NA 4440
## 7 Alamanc… Nort… NC Publ… 2 Year NA 2310
## 8 Albany … Geor… GA Publ… 2 Year NA 3246
## 9 Alexand… Minn… MN Publ… 2 Year NA 5416
## 10 Allan H… Cali… CA Publ… 2 Year NA 1418
## # ℹ 2,963 more rows
## # ℹ 3 more variables: in_state_total <dbl>, out_of_state_tuition <dbl>,
## # out_of_state_total <dbl>
Select columns
## # A tibble: 2,973 × 2
## state name
## <chr> <chr>
## 1 Montana Aaniiih Nakoda College
## 2 Texas Abilene Christian University
## 3 Georgia Abraham Baldwin Agricultural College
## 4 Minnesota Academy College
## 5 California Academy of Art University
## 6 Colorado Adams State University
## 7 New York Adelphi University
## 8 New York Adirondack Community College
## 9 Michigan Adrian College
## 10 Virginia Advanced Technology Institute
## # ℹ 2,963 more rows
## # A tibble: 2,973 × 2
## in_state_total out_of_state_total
## <dbl> <dbl>
## 1 2380 2380
## 2 45200 45200
## 3 12602 21024
## 4 17661 17661
## 5 44458 44458
## 6 18222 29238
## 7 54690 54690
## 8 17035 21595
## 9 48405 48405
## 10 13680 13680
## # ℹ 2,963 more rows
Summarize by groups
## # A tibble: 2,673 × 4
## type room_and_board in_state_tuition count
## <chr> <chr> <dbl> <int>
## 1 For Profit 10100 27090 1
## 2 For Profit 10466 22210 1
## 3 For Profit 10850 15428 1
## 4 For Profit 10928 21645 1
## 5 For Profit 11000 20056 1
## 6 For Profit 11600 31050 1
## 7 For Profit 12402 18485 1
## 8 For Profit 12820 21640 1
## 9 For Profit 13300 27750 1
## 10 For Profit 16648 27810 1
## # ℹ 2,663 more rows