From: Sundar Dorai-Raj <sundar.dorai-raj_at_pdf.com>

Date: Thu 18 Aug 2005 - 02:55:03 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Aug 18 02:59:46 2005

Date: Thu 18 Aug 2005 - 02:55:03 EST

Sounds like you are looking for ?cut:

> A <- runif(217) > B <- cut(A, c(0, 1/3, 2/3, 1), labels = c(0, 1, 2)) > # convert factor to numeric > as.numeric(levels(B)[B])

**HTH,
**
--sundar

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Aug 18 02:59:46 2005

*
This archive was generated by hypermail 2.1.8
: Sun 23 Oct 2005 - 15:27:37 EST
*