François Pinard wrote:
> Hi, R people.
>
> In ?factor, in the "Examples:" section, we see:
>
> ## suppose you want "NA" as a level, and to allowing missing values.
> (x <- factor(c(1, 2, "NA"), exclude = ""))
> is.na(x)[2] <- TRUE
> x # [1] 1 NA, used because NA is a level.
> is.na(
Hi, R people.
In ?factor, in the "Examples:" section, we see:
## suppose you want "NA" as a level, and to allowing missing values.
(x <- factor(c(1, 2, "NA"), exclude = ""))
is.na(x)[2] <- TRUE
x # [1] 1 NA, used because NA is a level.
is.na(x)
# [1] FALSE TRUE FALSE
I'm a bit