checkmate
checkmate copied to clipboard
Check on names does not error when using R keywords [suggestion]
I think the strict check on names should include R keywords.
checkmate::test_names("for", type = "strict")
#> [1] TRUE
Created on 2022-10-03 by the reprex package (v2.0.1)
While R tries to stop you at a first pass, it is possible to have a name of "for":
a <- data.frame("for" = 4)
a
#> for.
#> 1 4
setNames(a, "for")
#> for
#> 1 4
Created on 2023-09-28 with reprex v2.0.2