Re: [R] finding peaks in a simple dataset with R

2005-11-28 Thread Tuszynski, Jaroslaw W.
atrix format [nFeatures x nSamples] or in 3D array format [nFeatures x nSamples x nCopies]. Row names (rownames(X)) store M/Z mass of each row." I hope one of those solutions works for you. Good Luck. Jarek Tuszynski -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PRO

Re: [R] finding peaks in a simple dataset with R

2005-11-26 Thread Philippe Grosjean
Hello, This is interesting! Note that you have the turnpoints() function in pastecs library. The function calculates all peaks and pits in a series. It also calculates information of each turning point (peak or pit), according to Kendall's information theory. It is then possible to filter thes

Re: [R] finding peaks in a simple dataset with R

2005-11-26 Thread Dylan Beaudette
On Nov 25, 2005, at 10:27 AM, Martin Maechler wrote: > Let me try to summarize my view on this: > > - I still it would make sense to have a *simple* peaks() function > in R which provides the same (or more) functionality as the > corresponding S-plus one.From > For a proper data analysis sit

Re: [R] finding peaks in a simple dataset with R

2005-11-25 Thread Martin Maechler
Let me try to summarize my view on this: - I still it would make sense to have a *simple* peaks() function in R which provides the same (or more) functionality as the corresponding S-plus one.From For a proper data analysis situation, I think one would have to do something more sophisticat

Re: [R] finding peaks in a simple dataset with R

2005-11-24 Thread Gabor Grothendieck
On 11/24/05, Martin Maechler <[EMAIL PROTECTED]> wrote: > NA's have the big drawback of producing a logical vector that > can NOT be used for subsetting -- and subsetting was exactly a main > reason for the padding... > Since 'which' throws away NAs, one extra 'which' can solve that. In the foll

Re: [R] finding peaks in a simple dataset with R

2005-11-24 Thread Martin Maechler
> "Gabor" == Gabor Grothendieck <[EMAIL PROTECTED]> > on Wed, 23 Nov 2005 16:51:17 -0500 writes: Gabor> One idea might be, rather than have a peaks function, enhance Gabor> rle so that it optionally produces a third component with the Gabor> peak information, perhaps 1, 0,

Re: [R] finding peaks in a simple dataset with R

2005-11-24 Thread Petr Pikal
AIL PROTECTED]> To: Martin Maechler <[EMAIL PROTECTED]> Copies to: [EMAIL PROTECTED] Subject: Re: [R] finding peaks in a simple dataset with R > > > > I wonder if we shouldn't polish that a bit and add to R's > > s

Re: [R] finding peaks in a simple dataset with R

2005-11-23 Thread Dylan Beaudette
On Wednesday 23 November 2005 10:15 am, Tuszynski, Jaroslaw W. wrote: > >> I am looking for some way to locate peaks in a simple x,y data set. > > See my 'msc.peaks.find' function in 'caMassClass', it has a simple peak > finding algorithm. > > Jarek Tuszynski > > ___

Re: [R] finding peaks in a simple dataset with R

2005-11-23 Thread Gabor Grothendieck
One idea might be, rather than have a peaks function, enhance rle so that it optionally produces a third component with the peak information, perhaps 1, 0, -1 for peak, neither and trough. This would avoid any problems with ties since the output of rle is based on runs. On 11/23/05, Gabor Grothend

Re: [R] finding peaks in a simple dataset with R

2005-11-23 Thread Tuszynski, Jaroslaw W.
>> I am looking for some way to locate peaks in a simple x,y data set. See my 'msc.peaks.find' function in 'caMassClass', it has a simple peak finding algorithm. Jarek Tuszynski __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/li

Re: [R] finding peaks in a simple dataset with R

2005-11-23 Thread Gabor Grothendieck
On 11/23/05, Martin Maechler <[EMAIL PROTECTED]> wrote: > > "Marc" == Marc Kirchner <[EMAIL PROTECTED]> > > on Wed, 23 Nov 2005 14:33:28 + writes: > >>> >>> I wonder if we shouldn't polish that a bit and add to R's >>> standard 'utils' package. >>> > >Marc> Hm, I

Re: [R] finding peaks in a simple dataset with R

2005-11-23 Thread Dylan Beaudette
On Nov 23, 2005, at 8:10 AM, Martin Maechler wrote: >> "Marc" == Marc Kirchner <[EMAIL PROTECTED]> >> on Wed, 23 Nov 2005 14:33:28 + writes: > >>> >>> I wonder if we shouldn't polish that a bit and add to R's >>> standard 'utils' package. >>> > > Marc> Hm, I figured out there a

Re: [R] finding peaks in a simple dataset with R

2005-11-23 Thread Martin Maechler
> "Marc" == Marc Kirchner <[EMAIL PROTECTED]> > on Wed, 23 Nov 2005 14:33:28 + writes: >> >> I wonder if we shouldn't polish that a bit and add to R's >> standard 'utils' package. >> Marc> Hm, I figured out there are (at least) two versions out there, one be

Re: [R] finding peaks in a simple dataset with R

2005-11-23 Thread Marc Kirchner
> > I wonder if we shouldn't polish that a bit and add to R's > standard 'utils' package. > Hm, I figured out there are (at least) two versions out there, one being the "original" idea and a modification. === Petr Pikal in 2001 (based on Brian Ripley's idea)== peaks <- function(series, span=3)

Re: [R] finding peaks in a simple dataset with R

2005-11-23 Thread Martin Maechler
I've been asked in private, (and am replying BCC to the asker), >> I saw your post on the R-help archives page about the possibility of >> porting a function from S-Plus called peaks() to R. I am looking for >> some way to locate peaks in a simple x,y data set, and thought that R >> might be th