Skip to content
Back to formatted view

Raw Message

Message-ID: <53203426-216a-4c4b-9d48-8766d546c810@email.android.com>
Date: 2012-05-11T18:32:14Z
From: Jeff Newmiller
Subject: How to specify multiple regular expressions for pattern argument
In-Reply-To: <CAMCXXmq=vGk61sCq6Op4gt0ONcK-5vABmnb5rsHcY_D=MjZf9A@mail.gmail.com>

ls(pattern='^d.*[[:digit:]]$')
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Jun Shen <jun.shen.ut at gmail.com> wrote:

>Dear list,
>
>I want to show all the objects starting with "d" and ending with a
>digit.
>How do I specify these conditions in the pattern argument
>
>I can do one condition but not two
>
>ls(pattern='^d')
>ls(pattern='[[:digit:]]$')
>
>are working.
>
>But,
>
>ls(pattern='^d'&'[[:digit:]]$') is not working.
>
>Appreciate any comment.
>
>Jun Shen
>
>	[[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.