[R] how to get the position of an element in a vector ?

2007-07-03 Thread Benoit Chemineau
Hi, dear R developers, I've got a vector of monthly volatilities and i would like to get the position of the highest volatility of the vector without computing a loop. Is there a function that could give me such a result ? a-c(1,2,4,100,3) the highest value is the fourth of the vector. how can

Re: [R] how to get the position of an element in a vector ?

2007-07-03 Thread ONKELINX, Thierry
?which.max ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance

Re: [R] how to get the position of an element in a vector ?

2007-07-03 Thread Henrique Dallazuanna
which(a==max(a)) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 03/07/07, Benoit Chemineau [EMAIL PROTECTED] wrote: Hi, dear R developers, I've got a vector of monthly volatilities and i would like to get the position of the highest volatility of the vector