Learn R Programming

dtrackr (version 0.4.6)

p_count_if: Simple count_if dplyr summary function

Description

Simple count_if dplyr summary function

Usage

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

Value

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

Arguments

...

expression to be evaluated

na.rm

ignore NA values?

Examples

Run this code
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