Thanks Mark for your reply. Actually I was looking for following type
of solution:
> grep("(wti)|(asdf)", c("aa", "wti-fgg", "wtihjg", "fdsdasdf", "wti"))
[1] 2 3 4 5
However I was able to find the solution just using grep() function.
On Wed, Mar 20, 2013 at 11:48 PM, Mark Sharp wrote:
> I lik
I like the stringr package. Its functions allow vectors for the patterns.
>From the examples of str_detect()
> fruit <- c("apple", "banana", "pear", "pinapple")
> str_detect(fruit, "a")
[1] TRUE TRUE TRUE TRUE
> str_detect(fruit, "^a")
[1] TRUE FALSE FALSE FALSE
> str_detect(fruit, "a$")
[1] FAL
Le mercredi 20 mars 2013 à 21:58 +0530, Christofer Bogaso a écrit :
> Hello again, in the help page of grep() function, it is written that
>
> pattern:
>
> character string containing a regular expression (or character string
> for fixed = TRUE) to be matched in the given character vector. Coerc
Hello again, in the help page of grep() function, it is written that
pattern:
character string containing a regular expression (or character string
for fixed = TRUE) to be matched in the given character vector. Coerced
by as.character to a character string if possible. If a character
vector of l
Thank you so much.
On Fri, Apr 22, 2011 at 1:29 PM, David Winsemius wrote:
>
> On Apr 22, 2011, at 6:42 AM, neetika nath wrote:
>
>
> Thank you for your message. please see attach file for the template/test
> dataset of my file.
>
>
> On Thu, Apr 21, 2011 at 1:30 PM, David Winsemius
> wrote:
>
>
On Apr 22, 2011, at 6:42 AM, neetika nath wrote:
>
> Thank you for your message. please see attach file for the template/
> test dataset of my file.
>
>
> On Thu, Apr 21, 2011 at 1:30 PM, David Winsemius > wrote:
>
> On Apr 21, 2011, at 5:27 AM, neetika nath wrote:
>
> Thank you Dennis,
>
> yes
Thank you for your message. please see attach file for the template/test
dataset of my file.
On Thu, Apr 21, 2011 at 1:30 PM, David Winsemius wrote:
>
> On Apr 21, 2011, at 5:27 AM, neetika nath wrote:
>
> Thank you Dennis,
>>
>> yes the problem is the input file. i have .rdf file and the forma
On Apr 21, 2011, at 5:27 AM, neetika nath wrote:
Thank you Dennis,
yes the problem is the input file. i have .rdf file and the format
is in
same way i have posted earlier. if i open that file in notepad++ the
lines
are divided or broken with CR+LF character. so any suggestion to
retriev
Thank you Dennis,
yes the problem is the input file. i have .rdf file and the format is in
same way i have posted earlier. if i open that file in notepad++ the lines
are divided or broken with CR+LF character. so any suggestion to retrieve
SpeciesScientific information without changing the input
Hi:
This is a bit of a roundabout approach; I'm sure that folks with regex
expertise will trump this in a heartbeat. I modified the last piece of
the string a bit to accommodate the approach below. Depending on where
the strings have line breaks, you may have some odd '\n' characters
inserted.
#
Hi ALL,
I have very simple question regarding pattern matching. Could anyone tell me
how to I can use R to retrieve string pattern from text file. for example
my file contain following information
SpeciesCommon=(Human);SpeciesScientific=(Homo
sapiens);ReactiveCentres=(N,C,C,C,+
H,O,C,C,C,C,O,H);
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
<[EMAIL PROTECTED]> wrote:
>
> I want to make sure this piece of code I wrote is doing what I want it to do.
>
> ll<-function(string)
> {
On 30-Sep-08 14:36:04, bioinformatics_guy wrote:
> I want to make sure this piece of code I wrote is doing what
> I want it to do.
>
> ll<-function(string)
> {
> grep(string,dir(),value=T)
> }
>
> subdir = ll("Coverage_[1-9][0-9]$")
>
> I basically wrote a little function that would grab a
> I want to make sure this piece of code I wrote is doing what I want it
to do.
>
> ll<-function(string)
> {
>grep(string,dir(),value=T)
> }
>
>
> subdir = ll("Coverage_[1-9][0-9]$")
>
> I basically wrote a little function that would grab all the files of
form
> Coverage_[0-99]
>
> The w
I want to make sure this piece of code I wrote is doing what I want it to do.
ll<-function(string)
{
grep(string,dir(),value=T)
}
subdir = ll("Coverage_[1-9][0-9]$")
I basically wrote a little function that would grab all the files of form
Coverage_[0-99]
The way I wrote it, will it g
15 matches
Mail list logo