You would think base R would have a count function such as count(df$Team) and count(df$Team == “NYY”) but this gives the error “could not find function ‘count’”. Base R does not have a count function. Base R has at last four ways to perform a count:
Click through to learn the different ways available to you, including those built into R itself as well as other packages like dplyr
. H/T R-Bloggers.