Last chance! 50% off unlimited learning
Sale ends in
"["(x, ..., drop = FALSE)
"[["(x, ...)
"["(x, ...) <- value
"[["(x, ...) <- value
Extract
. If value
is not in levels(x)
, a missing value is
assigned with a warning.
Any contrasts
assigned to the factor are preserved
unless drop = TRUE
.
The [[
method supports argument exact
.
factor
, Extract
.
## following example(factor)
(ff <- factor(substring("statistics", 1:10, 1:10), levels = letters))
ff[, drop = TRUE]
factor(letters[7:10])[2:3, drop = TRUE]
Run the code above in your browser using DataLab