check_scalar {cloudfs}R 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.


[Package cloudfs version 0.1.3 Index]