powered by
"["(x, ..., drop = FALSE) "[["(x, ...) "["(x, ...) <- value "[["(x, ...) <- value
Extract
If value is not in levels(x), a missing value is assigned with a warning.
value
levels(x)
Any contrasts assigned to the factor are preserved unless drop = TRUE.
contrasts
drop = TRUE
The [[ method supports argument exact.
[[
exact
factor
## 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