prop_if: Proportion of TRUE Values in a Logical Vector

View source: R/RcppExports.R

prop_ifR Documentation

Proportion of TRUE Values in a Logical Vector

Description

This function calculates the proportion of TRUE values in a logical vector, with an option to remove missing values.

Usage

prop_if(x, na_rm = FALSE)

Arguments

x

A logical vector.

na_rm

Logical flag indicating whether to remove NA values before calculating the proportion (default is false).

Value

A numeric value representing the proportion of TRUE values in the vector.


ChristK/CKutils documentation built on April 11, 2025, 10:11 p.m.