Thanks a lot. It works great now!
Cc: R help
Sent: Friday, September 13, 2013 11:46 PM
Subject: Re: [R] problem with grep under loop
Hi,
dat1<- read.table("gao.txt",sep="",header=FALSE,stringsAsFactors=FALSE)
dat1
#
C.4.1 100 1.00 0.00
>5 - - u C.1 C.1.1 100 1.00 0.00
>6 - - u C.5 C.5.1 100 1.00 0.000000
> V9 V10 V11 V12 V13
>1 FPKM_conf_hi cov len major_iso_id ref_match_len
t happened here?
Thanks a lot for your help.
----- Original Message -
From: capricy gao
To: "r-help@r-project.org"
Cc:
Sent: Friday, September 13, 2013 9:29 PM
Subject: [R] problem with grep under loop
I am just testing the possibility of using grep under for loop:
>fo
and it looks ok. However, when I put it in
for loop, error message came:
argument is of length zero
Could you please help me figure out what happened here?
Thanks a lot for your help.
From: Jeff Newmiller
ect.org>
Sent: Friday, September 13, 2013 10:36 PM
Su
.00 0.059634 101 C.5.1 -
>
>
>____
> From: Jeff Newmiller
>To: capricy gao ; capricy gao ;
>"r-help@r-project.org"
>Sent: Friday, September 13, 2013 9:21 PM
>Subject: Re: [R] problem with grep under loop
>
>
>
C.2.1 -
4 0.00 0.059634 101 C.4.1 -
5 0.00 0.059634 101 C.2.1 -
6 0.00 0.059634 101 C.5.1 -
From: Jeff Newmiller
h...@r-project.org"
Sent: Friday, September 13, 2013 9:21 PM
This is because you are not printing it (with the print or cat functions). Keep
in mind that the visible result you get from calling a function or evaluating a
variable interactively comes from the interactive R command line, not from R
itself. Once you put such an expression inside a function (
-help@r-project.org"
Cc:
Sent: Friday, September 13, 2013 9:29 PM
Subject: [R] problem with grep under loop
I am just testing the possibility of using grep under for loop:
>for(i in 1:10){grep("a",letters)}
nothing came out;
when I ran:
>grep("a",letters),
I
Wrap a print or cat function around it.
Sent from my iPhone
On Sep 13, 2013, at 6:29 PM, capricy gao wrote:
>
>
> I am just testing the possibility of using grep under for loop:
>
>> for(i in 1:10){grep("a",letters)}
>
>
> nothing came out;
>
> when I ran:
>
>
>> grep("a",letters),
>
I am just testing the possibility of using grep under for loop:
>for(i in 1:10){grep("a",letters)}
nothing came out;
when I ran:
>grep("a",letters),
I got "1"
so in my for loop, I expected to see ten "1"s, but I did not.
Could anybody help me to figure out why? Thanks a lot for your h
On Mon, Oct 6, 2008 at 2:16 PM, Gundala Viswanath <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> This is the sample of the source data (tab delimited)
>
> http://dpaste.com/82660/plain/
>
> - Gundala Viswanath
> Jakarta - Indonesia
>
Hi,
using this data, your original code works flawlessly - nothing
Dear all,
This is the sample of the source data (tab delimited)
http://dpaste.com/82660/plain/
- Gundala Viswanath
Jakarta - Indonesia
On Mon, Oct 6, 2008 at 9:05 PM, Gustaf Rydevik <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 6, 2008 at 1:37 PM, Gundala Viswanath <[EMAIL PROTECTED]> wrote:
>> De
On Mon, Oct 6, 2008 at 1:37 PM, Gundala Viswanath <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I have no problem with this individual grep command:
>
>> datk <- grep("XM_528056", source$V1)
>> dat2 <- source[datk,]
>> print(dat2)
> V1 V2 V3 V4 V5 V6 V7
> 35995 XM_
Seems to work fine for me. You need to read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
You did not provide 'source', so I created one and it seems to work.
So I have to conclude you have something wrong in your d
Dear all,
I have no problem with this individual grep command:
> datk <- grep("XM_528056", source$V1)
> dat2 <- source[datk,]
> print(dat2)
V1 V2 V3 V4 V5 V6 V7
35995 XM_528056 panTro2 chr8 + 1775569 1896107 Chimpanzee
BUT, when I run them under the loop i
15 matches
Mail list logo