[R] using hist breaks as factor ?

Oleg Bartunov oleg at sai.msu.su
Mon Mar 29 19:03:41 CEST 2004


I have numeric vector z and I want to factorize it using z$breaks
which I got from histograms breaks. Is there an elegant way to do this ?
I, probably, could write a loop and check if z hits into some interval
and replace z with value of z$mids, but I suspect there is more
R-ish way.

	Regards,
		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg at sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83




More information about the R-help mailing list