On Mon, Aug 6, 2012 at 4:48 PM, Liviu Andronic <landronim...@gmail.com> wrote: > string, something that I find strange. At best NA is the equivalent of > an empty string. In this sense, if you Hmisc::describe() the vector > you get, as I would expect, that in the context of character vectors > NA and '' values are considered together: >
By the way, same question holds for nchar(): Should NA values be reported as 2-char strings, or as 0-char empty/missing values? > x <- c(letters, NA, '') > nchar(x) [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 0 Liviu ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.