is_count: Check for proper count

View source: R/utils.R

is_countR Documentation

Check for proper count

Description

This function checks whether the input is proper count, i.e., a single, positive integer.

Usage

is_count(x, allow_zero = FALSE, error = TRUE)

Arguments

x

Any object.

allow_zero

Either TRUE to allow a zero value, or FALSE (default) if not.

error

In the case that x is not a proper count, either TRUE (default) to throw an error or FALSE to return invisibly FALSE.

Value

If error = TRUE, either invisibly TRUE or an error is thrown. If error = FALSE, invisibly TRUE or FALSE.


ino documentation built on Sept. 29, 2023, 5:09 p.m.