[Rd] keepNA in nchar and nzchar
William Dunlap
wdunlap at tibco.com
Wed Mar 16 16:59:46 CET 2016
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]]
More information about the R-devel
mailing list