Re: [R] Continuous columns of matrix

2013-05-25 Thread eliza botto
Thanks william, I got it now... Elisa From: wdun...@tibco.com To: eliza_bo...@hotmail.com; ruipbarra...@sapo.pt CC: r-help@r-project.org Subject: RE: [R] Continuous columns of matrix Date: Sat, 25 May 2013 02:33:40 + What you call "continuous" I call "cyclic" (wi

Re: [R] Continuous columns of matrix

2013-05-24 Thread William Dunlap
use apply() if you to want to run it over each column. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com From: eliza botto [mailto:eliza_bo...@hotmail.com] Sent: Friday, May 24, 2013 4:41 PM To: ruipbarra...@sapo.pt; William Dunlap Cc: r-help@r-project.org Subject: RE: [R] Continuous columns o

Re: [R] Continuous columns of matrix

2013-05-24 Thread eliza botto
Bingo!!! This time it worked Thanks arun Thankyou very much indeed.. :D Elisa > Date: Fri, 24 May 2013 17:03:33 -0700 > From: smartpink...@yahoo.com > Subject: Re: [R] Continuous columns of matrix > To: eliza_bo...@hotmail.com > CC: wdun...@tibco.com; r-help@r-project.org

Re: [R] Continuous columns of matrix

2013-05-24 Thread eliza botto
33451964, 1.49415144965002, 1.30559703478921 > >) > >> f(x, plot=TRUE) # the plot illustrates what it is doing > >IndexValue > > 1 5 1.463772 > > 211 1.494151 > > > > Bill Dunlap > > Spotfire, TIBCO Software > > wdunlap

Re: [R] Continuous columns of matrix

2013-05-24 Thread eliza botto
1.49415144965002, 1.30559703478921 > >) > >> f(x, plot=TRUE) # the plot illustrates what it is doing > >IndexValue > > 1 5 1.463772 > > 211 1.494151 > > > > Bill Dunlap > > Spotfire, TIBCO Software > > wdunlap tibco.com > > &

Re: [R] Continuous columns of matrix

2013-05-24 Thread Rui Barradas
the following [,1] [,2] index 5.00 11.00 values 1.463772 1.494151 Is there anyway of doing it?? Thanks in advance Elisa Date: Fri, 24 May 2013 17:02:56 +0100 From: ruipbarra...@sapo.pt To: eliza_bo...@hotmail.com CC: b...@xs4all.nl; r-help@r-project.org Subject: Re: [R] Continuous

Re: [R] Continuous columns of matrix

2013-05-24 Thread eliza botto
t; > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > > Behalf > > Of eliza botto > > Sent: Friday, May 24, 2013 2:10 PM > > To: ruipbarra...@sapo.pt; r-help@r-project.org > > Subject: Re: [R] Con

Re: [R] Continuous columns of matrix

2013-05-24 Thread William Dunlap
CO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of eliza botto > Sent: Friday, May 24, 2013 2:10 PM > To: ruipbarra...@sapo.pt; r-help@r-project.org > Subject: Re: [R] Continuous colu

Re: [R] Continuous columns of matrix

2013-05-24 Thread eliza botto
es 1.463772 1.494151 Is there anyway of doing it?? Thanks in advance Elisa > Date: Fri, 24 May 2013 17:02:56 +0100 > From: ruipbarra...@sapo.pt > To: eliza_bo...@hotmail.com > CC: b...@xs4all.nl; r-help@r-project.org > Subject: Re: [R] Continuous columns of matrix > > Hello

Re: [R] Continuous columns of matrix

2013-05-24 Thread eliza botto
Thankyou very very much arun.:Delisa > Date: Fri, 24 May 2013 11:08:56 -0700 > From: smartpink...@yahoo.com > Subject: Re: [R] Continuous columns of matrix > To: eliza_bo...@hotmail.com > CC: r-help@r-project.org; ruipbarra...@sapo.pt > > Hi, > You may also try: >

Re: [R] Continuous columns of matrix

2013-05-24 Thread arun
do.call(rbind,fun2(x))) #Rui's function  identical(lst1,lst2) #[1] TRUE A.K. - Original Message - From: eliza botto To: Berend Hasselman Cc: "r-help@r-project.org" Sent: Friday, May 24, 2013 6:41 AM Subject: Re: [R] Continuous columns of matrix There you go!!! structure(c(

Re: [R] Continuous columns of matrix

2013-05-24 Thread eliza botto
Thanks rui..That was all i wanted... Elisa > Date: Fri, 24 May 2013 17:02:56 +0100 > From: ruipbarra...@sapo.pt > To: eliza_bo...@hotmail.com > CC: b...@xs4all.nl; r-help@r-project.org > Subject: Re: [R] Continuous columns of matrix > > Hello, > > No problem. Just

Re: [R] Continuous columns of matrix

2013-05-24 Thread Rui Barradas
za_bo...@hotmail.com CC: b...@xs4all.nl; r-help@r-project.org Subject: Re: [R] Continuous columns of matrix Hello, Something like this? fun2 <- function(x){ n <- length(x) imx <- which.max(x) if(imx == 1){ x[2] <- x[n] <- Inf }e

Re: [R] Continuous columns of matrix

2013-05-24 Thread eliza botto
pbarra...@sapo.pt > To: eliza_bo...@hotmail.com > CC: b...@xs4all.nl; r-help@r-project.org > Subject: Re: [R] Continuous columns of matrix > > Hello, > > Something like this? > > > fun2 <- function(x){ > n <- length(x) > imx <- which.max(x) >

Re: [R] Continuous columns of matrix

2013-05-24 Thread Rui Barradas
umber 12 than the second maximum can be in any row other than 1 and 11...thankyou very much for your help elisa Date: Fri, 24 May 2013 12:37:37 +0100 From: ruipbarra...@sapo.pt To: eliza_bo...@hotmail.com CC: b...@xs4all.nl; r-help@r-project.org Subject: Re: [R] Continuous columns of matrix He

Re: [R] Continuous columns of matrix

2013-05-24 Thread eliza botto
nl; r-help@r-project.org > Subject: Re: [R] Continuous columns of matrix > > Hello, > > Berend is right, it's at least confusing. To get just the index of the > maximum value in each column, > > apply(mat, 2, which.max) > > > To get that index and the two neighbours

Re: [R] Continuous columns of matrix

2013-05-24 Thread Rui Barradas
1.19319875840883, 0.533232612926756, 0.225531074123974, 0.122949089115578), .Dim = c(12L, 6L)) Thanks once again.. Elisa Subject: Re: [R] Continuous columns of matrix From: b...@xs4all.nl Date: Fri, 24 May 2013 12:36:47 +0200 CC: r-help@r-project.org To: eliza_bo...@hotmail.com On 24-05-2013, at 12:24, eliz

Re: [R] Continuous columns of matrix

2013-05-24 Thread eliza botto
, 0.0926010253161898, 0.362209761457517, 1.45769283057202, 3.16165004659667, 2.74903557756267, 1.94633472878995, 1.19319875840883, 0.533232612926756, 0.225531074123974, 0.122949089115578), .Dim = c(12L, 6L)) Thanks once again.. Elisa > Subject: Re: [R] Continuous columns of matrix > F

Re: [R] Continuous columns of matrix

2013-05-24 Thread Berend Hasselman
On 24-05-2013, at 12:24, eliza botto wrote: > Dear useRs,If i have a matrix, say, 12 rows and 6 columns. The columns are > continuous. I want to find the index of maximum values and the actual > maximum values. The maximum values in each column are the highest values and > the values greater

[R] Continuous columns of matrix

2013-05-24 Thread eliza botto
Dear useRs,If i have a matrix, say, 12 rows and 6 columns. The columns are continuous. I want to find the index of maximum values and the actual maximum values. The maximum values in each column are the highest values and the values greater than or equal to 80% of the maximum value. Moreover, i