[R] how to find interval?

gildororonar at mail-on.us gildororonar at mail-on.us
Tue Sep 17 12:58:19 CEST 2013


Quoting "PIKAL Petr" <petr.pikal at precheza.cz>:
> diff(c(0,which(1:10 %in% c(3, 5, 6, 10))))
> [1] 3 2 1 4

That solves the problem! Thanks.



More information about the R-help mailing list