Re: [Rd] Syntactically valid names

From: steven mosher <moshersteven_at_gmail.com>
Date: Tue, 05 Jul 2011 16:31:09 -0700

 regexp approach is kinda ugly

http://www.r-bloggers.com/testing-for-valid-variable-names/

On Tue, Jul 5, 2011 at 3:29 PM, Hadley Wickham <hadley_at_rice.edu> wrote:

> > I wouldn't expect so. The basic structure might be handled using a regexp
> of sorts, but even that is tricky because of the "dot not followed by
> number" rule, and then there's the stop list of reserved words, which would
> make your code clumsy whatever you do.
> >
> > How on Earth would you expect anything to be significantly more elegant
> than your
> >
> > function(x) x == make.names(x)
> >
> > anyway??! (OK, if there was a wrapper for the C level isValidName()
> function...)
>
> Good point. Thanks!
>
> Hadley
>
> --
> Assistant Professor / Dobelman Family Junior Chair
> Department of Statistics / Rice University
> http://had.co.nz/
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 05 Jul 2011 - 23:44:58 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Jul 2011 - 01:00:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive