9.2 Counting Groups

Groups can be counted using dplyr::count().

ds %>% count(wind_dir_3pm)
## # A tibble: 17 x 2
##    wind_dir_3pm     n
##    <ord>        <int>
##  1 N            11362
##  2 NNE           8806
##  3 NE           10950
##  4 ENE          10357
##  5 E            10906
##  6 ESE          11179
##  7 SE           13903
##  8 SSE          11979
##  9 S            12711
## 10 SSW          10732
## 11 SW           12005
## 12 WSW          12571
## 13 W            13283
## 14 WNW          11675
## 15 NW           11097
## 16 NNW          10186
## 17 <NA>          7729


Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.