# NOT RUN {
x <- rep(c(1:4,8,9),2,length=60)
labels(x) <- c(
a=1,
b=2,
c=3,
d=4,
dk=8,
refused=9
)
missing.values(x) <- 9
missing.values(x)
missing.values(x) <- missing.values(x) + 8
missing.values(x)
missing.values(x) <- NULL
missing.values(x)
missing.values(x) <- list(range=c(8,Inf))
missing.values(x)
valid.values(x)
print(x)
is.missing(x)
is.valid(x)
as.factor(x)
as.factor(include.missings(x))
as.integer(x)
as.integer(include.missings(x))
# }
Run the code above in your browser using DataLab