[R] Pattern match in R
ggrothendieck at gmail.com
Tue Sep 30 18:01:28 CEST 2008
Try this where ? signifies that the prior character is optional:
dir(pattern = "^Coverage_[1-9]?[0-9]$")
On Tue, Sep 30, 2008 at 10:36 AM, bioinformatics_guy
<wwwhitener at gmail.com> wrote:
> I want to make sure this piece of code I wrote is doing what I want it to do.
> subdir = ll("Coverage_[1-9][0-9]$")
> I basically wrote a little function that would grab all the files of form
> The way I wrote it, will it grab Coverage_5 or does it have to have 2
> numbers (10-99)?
> View this message in context: http://www.nabble.com/Pattern-match-in-R-tp19743389p19743389.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> 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