[Rd] Syntactically valid names
Hadley Wickham
hadley at rice.edu
Wed Jul 6 01:40:17 CEST 2011
On Tue, Jul 5, 2011 at 7:31 PM, steven mosher <moshersteven at gmail.com> wrote:
> regexp approach is kinda ugly
> http://www.r-bloggers.com/testing-for-valid-variable-names/
Hmm, I think that suggests a couple of small bug in make.names:
> make.names("...")
[1] "..."
> make.names("..1")
[1] "..1"
and
> x <- paste(rep("x", 1e6), collapse = "")
> x == make.names(x)
[1] TRUE
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
More information about the R-devel
mailing list