look at ?which(), e.g., which(vector == 200)
Best, Dimitris ---- Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm ----- Original Message ----- From: "Cleber N. Borges" <[EMAIL PROTECTED]> To: "R Help" <[email protected]> Sent: Thursday, September 28, 2006 5:01 PM Subject: [R] get index of elements in vector > > Hello all > > > Is There a fuction that return a index of a element in vector? > like this semantic example: > > vector = c( 100, 200, 300 ) > > getINDEX( vector, value = 200 ) > > Thanks in advance for your attention. > > > Cleber Borges > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
