Skip to contents

check_par_name() validates the input for par_name to ensure it is a character string of length 1. If the input is valid, it is returned as-is; otherwise, a default value of "argument" is returned.

Usage

check_par_name(par_name = "vec")

Arguments

par_name

A character string representing the name of a parameter. Default is "vec".

Value

A character string. If par_name is valid, it is returned unchanged. Otherwise, the function returns the string "argument".

Examples

check_par_name("x")
#> [1] "x"
check_par_name(42)
#> [1] "argument"