countif: count number of record / row

Description Usage Arguments Value Examples

View source: R/basetools.R

Description

Count return the number of row sastifying a condition.

Usage

1
countif(expr)

Arguments

expr

A logical expression ora data.frame. If a data.frame or a vector is given, countif() return the number of rows. If a logical expression is given, countif() return the number of records satisfaying the condition If a logical expression is given, the expression can use short column names (variable names) as long as the default data.frame has been selected using setdata(thedataframe)

Value

Number of rows macthing the expression

Examples

1
countif(c(1, 2, 3, 1) == 1)

gdesve/epifield documentation built on Jan. 23, 2022, 10:03 a.m.