check_simple_name: Test whether variable name can be used within Show R Code

View source: R/utils.R

check_simple_nameR Documentation

Test whether variable name can be used within ⁠Show R Code⁠

Description

Variable names containing spaces are problematic and must be wrapped in backticks. Also, they should not start with a number as R may silently make it valid by changing it. Therefore, we only allow alphanumeric characters with underscores. The first character of the name must be an alphabetic character and can be followed by alphanumeric characters.

Usage

check_simple_name(name)

Arguments

name

(character) vector of names to check

Value

Returns NULL or raises error.


teal.slice documentation built on May 29, 2024, 1:39 a.m.