myfrac: Print the fraction of TRUEs in a vector of logicals

myfracR Documentation

Print the fraction of TRUEs in a vector of logicals

Description

Print the fraction of TRUEs in a vector of logicals

Usage

myfrac(vec)

Arguments

vec

Vector of logicals

Value

Fraction of TRUE values in vec

Examples

set.seed(123)
myfrac(rnorm(10) > 0)
myfrac(TRUE)
myfrac(FALSE)

powestermark/pwrutilities documentation built on Dec. 28, 2024, 4:44 a.m.