1 Lecture Note 1

  • Split-Apply-Combine Strategy
  • Brute force programming
  • Old fashioned Split-Apply-Combine
  • purrr Split-Apply-Combine

4 purrr Split-Apply-Combine

# A tibble: 3 x 2
  Species    mean_sepal_length
  <fct>                  <dbl>
1 setosa                  5.01
2 versicolor              5.94
3 virginica               6.59
# A tibble: 3 x 3
# Groups:   Species [3]
  Species              data mean_sepal_length
  <fct>      <list<df[,4]>>             <dbl>
1 setosa           [50 × 4]              5.01
2 versicolor       [50 × 4]              5.94
3 virginica        [50 × 4]              6.59