Hi all,
I just noticed this odd behavior in R 1.5.1 (on Solaris 2.6):
  R> cut(c(2,NA), 1:5, labels=F)
     [1] 1 0
Is it a bug?  I would have expected "1 NA" (better for indexing), and
also the
S-Plus analog is:
  S-Plus> as.integer(cut(c(2,NA), 1:5))
     [1]  1 NA
Apologies ahead of time if it's already fixed in R 1.6.0 and/or already
known
(perhaps related to PR#1694?).  If others agree it's a bug I'll submit
it.
-- 
                              -- David Brahm (brahm@alum.mit.edu)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 15 Oct 2002, David Brahm wrote:> Apologies ahead of time if it's already fixed in R 1.6.0 and/or already known > (perhaps related to PR#1694?). If others agree it's a bug I'll submit it.In R 1.6.0> cut(c(2,NA), 1:5, labels=FALSE)[1] 1 NA -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Seemingly Similar Threads
- Bug in "[<-.matrix"? (Was: Feature Request: "matrix[1:10,1:10, block=F] <- 1:10")
 - Misalignment of <NA> in rownames (PR#1905)
 - as.character.factor when the factor contains "NA"
 - order(1, na.last=NA) fails (PR#1913)
 - Characters subsetted with NA (was: Several R vs S-Plus issues)