Chapter 8 Descriptive States in data frames.

  • mean() - finds the mean of a vector

  • sd() - find the standard deviation

  • median() - finds the median

  • max() - finds the max

  • min() - finds the min

  • range() - returns the range of a vector

  • summary() - give min, 1st quantile, Median, Mean, 3rd Quantile and Max.

## [1] 2
## [1] 1.581139
## [1] 2
## [1] 4
## [1] 0 4
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##       0       1       2       2       3       4

8.0.1 Challenge

Filter the hits_data_frame to to find the person with the highest batting average. Change the playerID “best_player”