[prev in list] [next in list] [prev in thread] [next in thread]
List: r-devel
Subject: [Rd] keepNA in nchar and nzchar
From: William Dunlap via R-devel <r-devel () r-project ! org>
Date: 2016-03-16 15:59:46
Message-ID: CAF8bMcaL8_E96qqyQFUkb5Xpvsi+iYMt-gUyAqipTkK0OXSqUA () mail ! gmail ! com
[Download RAW message or body]
Is it intended that in yesterday's version of R-devel the default value of
keepNA is different in nchar (NA) and nzchar (FALSE)?
> args(nchar)
function (x, type = "chars", allowNA = FALSE, keepNA = NA)
NULL
> args(nzchar)
function (x, keepNA = FALSE)
NULL
Is it intended that for keepNA=NA, nchar and nzchar do not
give concordant results?
> vapply(c(TRUE, FALSE, NA), function(keepNA) nchar(NA_character_,
keepNA=keepNA), FUN.VALUE=integer(1))
[1] NA 2 NA
> vapply(c(TRUE, FALSE, NA), function(keepNA) nzchar(NA_character_,
keepNA=keepNA), FUN.VALUE=logical(1))
[1] NA TRUE TRUE
> version$version.string
[1] "R Under development (unstable) (2016-03-15 r70334)"
Bill Dunlap
TIBCO Software
wdunlap tibco.com
[[alternative HTML version deleted]]
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic