| classified.classified | R Documentation |
See classified.default.
Formerly (version 0.10.10), calling classified() on a
classified object was a non-operation.
Currently we call factor(x, ...) and then
try to reconcile the codelist attribute with resulting
levels.
## S3 method for class 'classified'
classified(
x,
levels,
labels,
exclude = NULL,
ordered = is.ordered(x),
nmax = NA,
drop = FALSE,
...
)
x |
classified |
levels |
passed to |
labels |
passed to |
exclude |
passed to |
ordered |
passed to |
nmax |
passed to |
drop |
whether to drop unused levels |
... |
ignored |
By default classified is idempotent, such that classified(classified(x)) is the same as classified(x). In contrast, factor(factor(x)) will drop unused levels (not shown). To drop unused levels, use classified(classified(x), drop = TRUE).
'classified' 'factor'
Other classified:
[.classified(),
[<-.classified(),
[[.classified(),
[[<-.classified(),
as.integer.classified(),
c.classified(),
classified(),
classified.data.frame(),
classified.default(),
classified.dvec(),
classified.factor(),
desolve.classified(),
unclassified(),
unclassified.classified(),
unclassified.data.frame()
a <- 4:6
attr(a, 'codelist') <- list(d = 4, e = 5, f = 6, g = 7)
b <- classified(a)
a
b
class(b)
classified(b)
identical(b, classified(b))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.