ansal, Vikas
Cc: r-help@r-project.org
Subject: Re: [R] For help in R coding
If I understand correctly, you want to keep the rows from each table
which have common values in the second column. In which case, merge
will work for this, such as in this example.
Say you have these data frames:
> fra
__
From: ONKELINX, Thierry [thierry.onkel...@inbo.be]
Sent: Tuesday, July 05, 2011 3:53 PM
To: Bansal, Vikas; David Winsemius
Cc: r-help@r-project.org
Subject: RE: [R] For help in R coding
Dear Vikas,
Have at look at ?merge()
Best regards,
Thierry
> -Oorspronkelijk bericht--
bo.be]
> Sent: Tuesday, July 05, 2011 3:53 PM
> To: Bansal, Vikas; David Winsemius
> Cc: r-help@r-project.org
> Subject: RE: [R] For help in R coding
>
> Dear Vikas,
>
> Have at look at ?merge()
>
> Best regards,
>
> Thierry
>
>> -Oorspronkelijk bericht-
From: ONKELINX, Thierry [thierry.onkel...@inbo.be]
Sent: Tuesday, July 05, 2011 3:53 PM
To: Bansal, Vikas; David Winsemius
Cc: r-help@r-project.org
Subject: RE: [R] For help in R coding
Dear Vikas,
Have at look at ?merge()
Best regards,
Thierry
> -Oorspronkelijk bericht-
>
ct.org
> Onderwerp: Re: [R] For help in R coding
>
> Dear all,
>
> I have one problem and did not find any solution.Please I want your help.
>
> I have two data frames and I want to concatenate them.But the thing is-
>
> two data frames are like this-
>
> V1
: Bansal, Vikas
Cc: Dennis Murphy; r-help@r-project.org
Subject: Re: [R] For help in R coding
On Jul 3, 2011, at 6:10 PM, Bansal, Vikas wrote:
>
>
> From: David Winsemius [dwinsem...@comcast.net]
> Sent: Sunday, July 03, 2011 7:08 PM
>&g
__
From: David Winsemius [dwinsem...@comcast.net]
Sent: Monday, July 04, 2011 2:02 AM
To: Bansal, Vikas
Cc: Dennis Murphy; r-help@r-project.org
Subject: Re: [R] For help in R coding
On Jul 3, 2011, at 6:10 PM, Bansal, Vikas wrote:
So I want to code so that it will give the output like this-
-project.org
Subject: Re: [R] For help in R coding
On Jul 3, 2011, at 6:10 PM, Bansal, Vikas wrote:
>> So I want to code so that it will give the output like this-
>>
>> DATA FRAME (Input)
Editing the task so it is reproducible:
dat <- read.table(textConnection(' col3
On Jul 3, 2011, at 6:10 PM, Bansal, Vikas wrote:
So I want to code so that it will give the output like this-
DATA FRAME (Input)
Editing the task so it is reproducible:
dat <- read.table(textConnection(' col3 col9
T .a,g,,
A.t,t,,
On Jul 3, 2011, at 6:10 PM, Bansal, Vikas wrote:
From: David Winsemius [dwinsem...@comcast.net]
Sent: Sunday, July 03, 2011 7:08 PM
the code is same i just want to add a condition so that it should
check that if in column 3, the character is A
Say you have the string x in a matrix
x<-c('a,..gGGtTaachttp://r.789695.n4.nabble.com/For-help-in-R-coding-tp3639413p3642655.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/
From: David Winsemius [dwinsem...@comcast.net]
Sent: Sunday, July 03, 2011 7:08 PM
To: Bansal, Vikas
Cc: Dennis Murphy; r-help@r-project.org
Subject: Re: [R] For help in R coding
On Jul 3, 2011, at 1:07 PM, Bansal, Vikas wrote:
> Yes you are ri
is the output for first five rows.
Can you please help me how to use this if condition in your coding
or we can also do it by using some other condition rather than if
condition?
From: David Winsemius [dwinsem...@comcast.net]
Sent: Sunday,
rather than if condition?
________
From: David Winsemius [dwinsem...@comcast.net]
Sent: Sunday, July 03, 2011 3:57 AM
To: Bansal, Vikas
Cc: Dennis Murphy; r-help@r-project.org
Subject: Re: [R] For help in R coding
On Jul 2, 2011, at 4:46 PM, Bansa
able to check my guesses against you full
specifications.
--
David.
Can you please help me how to use this if condition in your coding
or we can also do it by using some other condition rather than if
condition?
________
From: David Winsemiu
_
From: David Winsemius [dwinsem...@comcast.net]
Sent: Saturday, July 02, 2011 9:04 PM
To: Dennis Murphy
Cc: r-help@r-project.org; Bansal, Vikas
Subject: Re: [R] For help in R coding
On reflection and a bit of testing I think the best approach would be
to use gregexpr. For counting the numb
__
From: Dennis Murphy [djmu...@gmail.com]
Sent: Saturday, July 02, 2011 8:22 PM
To: r-help@r-project.org
Cc: Bansal, Vikas; David Winsemius
Subject: Re: [R] For help in R coding
Hi:
There seems to be a problem if the string ends in , or . , which makes
it
Thanking you,
Warm Regards
Vikas Bansal
Msc Bioinformatics
Kings College London
From: David Winsemius [dwinsem...@comcast.net]
Sent: Saturday, July 02, 2011 6:19 PM
To: Bansal, Vikas
Cc: r-help@r-project.org
Subject: Re: [R] For help in R coding
On Jul 2
on returns
a vector. (It doesn't hurt, but it is unnecessary.)
Thanking you,
Warm Regards
Vikas Bansal
Msc Bioinformatics
Kings College London
From: David Winsemius [dwinsem...@comcast.net]
Sent: Saturday, July 02, 2011 9:04 PM
To: Dennis Murphy
Cc:
On reflection and a bit of testing I think the best approach would be
to use gregexpr. For counting the number of commas, this appears quite
straightforward.
> sapply(gregexpr("\\,", txtvec), function(x) if ( x[[1]] != -1)
length(x) else 0 )
[1] 3 3 3 4 3 3 2 6 4 6 6
It easily generalize
Hi:
There seems to be a problem if the string ends in , or . , which makes
it difficult for strsplit() to pick up if it is splitting on those
characters. Here is an alternative, splitting on individual characters
and using charmatch() instead:
charsum <- function(s, char) {
u <- strsplit(s, "
>> Dear all,
>>
>> I am doing a project on variant calling using R.I am working on
>> pileup file.There are 10 columns in my data frame and I want to
>> count the number of A,C,G and T in each row for column 9.example of
>> column 9 is given below-
>>
>> .a,g,,
>> .t,t,,
>>
On Jul 2, 2011, at 12:34 PM, Bansal, Vikas wrote:
Dear all,
I am doing a project on variant calling using R.I am working on
pileup file.There are 10 columns in my data frame and I want to
count the number of A,C,G and T in each row for column 9.example of
column 9 is given below-
ege London
____________
From: David Winsemius [dwinsem...@comcast.net]
Sent: Saturday, July 02, 2011 2:07 AM
To: Bansal, Vikas
Subject: Re: [R] For help in R coding
On Jul 1, 2011, at 8:01 PM, Bansal, Vikas wrote:
> Dear David,
>
> Thanks for your reply.I tri
_
From: David Winsemius [dwinsem...@comcast.net]
Sent: Friday, July 01, 2011 11:25 PM
To: Bansal, Vikas
Cc: r-help@r-project.org
Subject: Re: [R] For help in R coding
On Jul 1, 2011, at 12:47 PM, Bansal, Vikas wrote:
> Dear all,
>
> I am doing a project on variant calling using R.I am wor
ollege London
________________
From: David Winsemius [dwinsem...@comcast.net]
Sent: Saturday, July 02, 2011 2:07 AM
To: Bansal, Vikas
Subject: Re: [R] For help in R coding
On Jul 1, 2011, at 8:01 PM, Bansal, Vikas wrote:
Dear David,
Thanks for your reply.I tried your cod
On Fri, Jul 1, 2011 at 12:47 PM, Bansal, Vikas wrote:
> Dear all,
>
> I am doing a project on variant calling using R.I am working on pileup
> file.There are 10 columns in my data frame and I want to count the number of
> A,C,G and T in each row for column 9.example of column 9 is given below-
>
On Jul 1, 2011, at 12:47 PM, Bansal, Vikas wrote:
Dear all,
I am doing a project on variant calling using R.I am working on
pileup file.There are 10 columns in my data frame and I want to
count the number of A,C,G and T in each row for column 9.example of
column 9 is given below-
Dear all,
I am doing a project on variant calling using R.I am working on pileup
file.There are 10 columns in my data frame and I want to count the number of
A,C,G and T in each row for column 9.example of column 9 is given below-
.a,g,,
.t,t,,
.,c,c,
29 matches
Mail list logo