p_count_if: Simple count_if dplyr summary function

View source: R/dtrackr.R

p_count_ifR Documentation

Simple count_if dplyr summary function

Description

Simple count_if dplyr summary function

Usage

p_count_if(..., na.rm = TRUE)

Arguments

...

expression to be evaluated

na.rm

ignore NA values?

Value

a count of the number of times the expression evaluated to true, in the current context

Examples

library(dplyr)
library(dtrackr)
tmp = iris %>% dplyr::group_by(Species)
tmp %>% dplyr::summarise(long_ones = p_count_if(Petal.Length > 4))

dtrackr documentation built on Oct. 21, 2024, 5:06 p.m.