It seems like a recent trend in R has been to make character vectors
and factors almost equivalent (apart from the way that factors always
remember their original range). ?There are a few exceptions:
?* summary.character != summary.factor
?* table(x, exclude = NULL) != table(factor(x), exclude=NULL) when x
includes missing values
?* strsplit on a factor
strsplit(factor(c("a", "a b")), " ")
Error in strsplit(factor(c("a", "a b")), " ") : non-character argument
?* nchar on a factor:
nchar(factor(c("abc", "d", "defgh")))
[1] 1 1 1
?* : with two character strings
Error in "a":"b" : NA/NaN argument
In addition: Warning messages:
1: NAs introduced by coercion
2: NAs introduced by coercion