Re: [R] Find duplicates and save their max value

2007-10-25 Thread Henrique Dallazuanna
Hi, data.frame(GeneName=unique(df$GeneName),Value=sapply(unique(df$GeneName), function(x)max(df$Value[df$GeneName==x]))) On 25/10/2007, Paul Christoph Schröder <[EMAIL PROTECTED]> wrote: > > Hi, > > maybe someone can help me with this: > > I have a matrix of genes and values: > GeneName Value

Re: [R] Find duplicates and save their max value

2007-10-25 Thread Benilton Carvalho
?aggregate b On Oct 25, 2007, at 1:21 PM, Paul Christoph Schröder wrote: > Hi, > > maybe someone can help me with this: > > I have a matrix of genes and values: > GeneName Value > Abc1 10 > Abc2 11 > Bbc1-5 > Bbc31 2 > Ccd

[R] Find duplicates and save their max value

2007-10-25 Thread Paul Christoph Schröder
Hi, maybe someone can help me with this: I have a matrix of genes and values: GeneName Value Abc1 10 Abc2 11 Bbc1-5 Bbc31 2 Ccd 5 Ccd -2 Ccd 7 Dda 5 Dd