powered by
Checks whether each element of a character vector is a syntactically valid name.
check_name(x, x_name = substitute(x), coerce = FALSE, error = TRUE)
The object to check.
A string of the name of the object.
A flag specifying whether to coerce a factor to a character vector and drop attributes including names.
A flag indicating whether to throw an informative error or immediately generate an informative message if the check fails.
An invisible copy of x (if it doesn't throw an error).
check_character
# NOT RUN { vec <- c("x", "x.y", "x y") check_name(vec, error = FALSE) # }
Run the code above in your browser using DataLab