On June 30, 2011 01:37:57 PM Hadley Wickham wrote:
> Is there any easy way to tell if a string is a syntactically valid name?
[...]
>
> One implementation would be:
>
> is.syntactic <- function(x) x == make.names(x)
>
> but I wonder if there's a more elegant way.
This is without quoting, right? Because "make.names" replaces spaces with
periods, and using quoting I can create syntactically valid names that do
include spaces:
`x prime` <- 3
ls()
Davor
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel