Skip to content
Prev 308727 / 398503 Next

vector indexing

Hi,

Is it what you're looking for?

which(y>4)  ##all indexes for y>4
[1]  3  6  7  9 11
which(y>4)[1]  ##the first index
[1] 3

HTH,
Ivan

--
Ivan CALANDRA
Universit? de Bourgogne
UMR CNRS/uB 6282 Biog?osciences
6 Boulevard Gabriel
21000 Dijon, FRANCE
+33(0)3.80.39.63.06
ivan.calandra at u-bourgogne.fr
http://biogeosciences.u-bourgogne.fr/calandra

Le 23/10/12 11:21, Al Ehan a ?crit :