[R] Differentiate alphanumeric vs numeric strings

Gabor Grothendieck ggrothendieck at gmail.com
Fri Apr 25 05:49:03 CEST 2008

This has the disadvantage of producing a warning when it finds
non-numerics and also there
are situations like 1E1 which it will regard as numeric so using
a regexp is probably preferred but it is simple:


On Thu, Apr 24, 2008 at 10:39 PM, Farrel Buchinsky <fjbuch at gmail.com> wrote:
> I have a bunch of tables in a Microsoft Access database. An updated database
> is sent to me every week containing a new table. I know that is inefficient
> and weird but welcome to my life. I want to read the tables whose names are
> something such as "040207" but not the ones that have alphanumeric names
> such as "everyone". Using RODBC I am easily able to create a character
> vector of the names of the tables. Is there a function that can
> differentiate values consisting only of digits (numerics) as opposed to ones
> that contain letters (and perhaps digts as well)? I am sure there is. What
> is it and where should I have found it?
> --
> Farrel Buchinsky
> GrandCentral Tel: (412) 567-7870
>        [[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list