check_scalar: Check if Function Argument is Scalar

View source: R/cli.R

check_scalarR Documentation

Check if Function Argument is Scalar

Description

A function to check that argument is of proper class and of length 1.

Usage

check_scalar(..., arg_class, alt_null = FALSE)

Arguments

...

Function argument that is being asserted.

arg_class

Class name. Usually "character", "numeric", "data.frame", etc.

alt_null

Logical. Should argument accept NULL value.

Value

Invisible NULL if assertion is TRUE, otherwise an error message.


cloudfs documentation built on May 29, 2024, 11:08 a.m.