Description Usage Arguments Value Examples
View source: R/is_syntactically_valid_name.R
Checks for valid names by make.names
,
i.e. x
is valid iff make.names
does nothing with x
.
1 |
x |
An object. |
A logical with length 1. TRUE
when x
is a character with length > 0 without duplicates
and is valid. Else FALSE
and a warning what's wrong.
1 2 3 4 5 6 7 | x <- c('asdf', NA,'.na', '<y', 'asdf', 'asdf.1')
is_syntactically_valid_name(x)
is_syntactically_valid_name(x[FALSE]) # FALSE because empty
is_syntactically_valid_name(NA) # FALSE because not character
is_syntactically_valid_name(as.character(NA)) # FALSE because NA
is_syntactically_valid_name('NA') # FALSE. make.names changes 'NA' to 'NA.'
is_syntactically_valid_name(letters) # TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.