From wdunlap at tibco.com  Wed Mar 16 16:59:46 2016
From: wdunlap at tibco.com (William Dunlap)
Date: Wed, 16 Mar 2016 08:59:46 -0700
Subject: [Rd] keepNA in nchar and nzchar
Message-ID: <CAF8bMcaL8_E96qqyQFUkb5Xpvsi+iYMt-gUyAqipTkK0OXSqUA@mail.gmail.com>

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]]



[Rd] keepNA in nchar and nzchar
William Dunlap