Skip to content
Prev 130171 / 398498 Next

Odp: Cutting a vector

Hi

you shall be more specific. Do you want to split your vector according 
some pionts

split(x, findInterval(x, c(6,12,16)))

if you want to make a factor from your x vector, then you can use 
findInterval or cut

cut(x, breaks = c(0,6,12,17, +Inf))

Or something else?
Regards

Petr
petr.pikal at precheza.cz

r-help-bounces at r-project.org napsal dne 22.11.2007 12:52:38:
http://www.R-project.org/posting-guide.html