R-beta: cut function when max(x) == max(breaks)

Douglas Bates (bates@stat.wisc.edu)
Tue, 22 Apr 1997 22:42:46 -0500 (CDT)


Message-Id: <m0wJsxW-000hhBC@franz.stat.wisc.edu>
Date: Tue, 22 Apr 1997 22:42:46 -0500 (CDT)
From: Douglas Bates <bates@stat.wisc.edu>
To: r-help@stat.math.ethz.ch
Subject: R-beta: cut function when max(x) == max(breaks)

As I recall the S-plus and S "cut" functions return length(breaks)
when an element of x is equal to the maximum value of breaks.  The R
version of "cut" calls the C function "bincode" which returns an NA
for this situation then cut croaks trying to make a factor with the
result.

I can provide a detailed example if this would help.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=