powered by
Simple count_if dplyr summary function
p_count_if(..., na.rm = TRUE)
a count of the number of times the expression evaluated to true, in the current context
expression to be evaluated
ignore NA values?
library(dplyr) library(dtrackr) tmp = iris %>% dplyr::group_by(Species) tmp %>% dplyr::summarise(long_ones = p_count_if(Petal.Length > 4))
Run the code above in your browser using DataLab