From hadley at rice.edu  Wed Jul  6 01:40:17 2011
From: hadley at rice.edu (Hadley Wickham)
Date: Tue, 5 Jul 2011 19:40:17 -0400
Subject: [Rd] Syntactically valid names
In-Reply-To: <CAFFLneRp4YY7U+Nn26C+hFhX-4PWaHZMFizBmgEtNg2jjK93qg@mail.gmail.com>
References: <BANLkTimg=TM0hYA1=Obknb+486Hv8T7Fdw@mail.gmail.com>
	<2698F67A-DDF9-4EAF-B7A8-A4FAAE9CCC6B@gmail.com>
	<CABdHhvHmRP6XOkTq+4Z1NjvW1SRwqt1AUwga_ovbMOfi3zi5oA@mail.gmail.com>
	<CAFFLneRp4YY7U+Nn26C+hFhX-4PWaHZMFizBmgEtNg2jjK93qg@mail.gmail.com>
Message-ID: <CABdHhvEhKGZjSX_fRAAi6_PjHgnhOra_f7w8Y+R8Pw8gGm92OQ@mail.gmail.com>

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/



[Rd] Syntactically valid names
Hadley Wickham