[R] A point in a vector?
Corrado
ct529 at york.ac.uk
Wed Sep 30 22:10:34 CEST 2009
Dear list,
I have a strange requirement .... I have a vector, for example v<-
c(0,0,0,0,1,2,4,6,8,8,8,8). I have a value,for example x<- 4.8.
I would like to understand in which sub interval of v is x. In this case, v
would be in the sub interval [4,6] that is in the subinterval starting from
element j=7 to the element j+1=8.
Can we do that with an R command?
Regards
--
Corrado Topi
Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: ct529 at york.ac.uk
More information about the R-help
mailing list