Last chance! 50% off unlimited learning
Sale ends in
Creates a factor of subclass 'classified',
for which there are attribute-preserving methods.
In particular, classified has a codelist attribute
indicating the origin of its levels: it is
constructed from the codelist attribute of x
if available, or from 'levels' and 'labels'
by default. Unlike the case for factor
,
length of labels cannot be one (i.e., different from
length of levels).
# S3 method for default
classified(
x = character(),
levels,
labels = levels,
exclude = NA,
ordered = is.ordered(x),
nmax = NA,
...
)
see factor
see factor
see factor
, must have same length as levels
see factor
see factor
see factor
ignored
'classified' 'factor'
Other classified:
[.classified()
,
[<-.classified()
,
[[.classified()
,
[[<-.classified()
,
c.classified()
,
classified.data.frame()
,
classified()
,
unclassified.classified()
,
unclassified.data.frame()
,
unclassified()
# NOT RUN {
classified(1:3)
classified(1:3, levels = 4:6)
classified(1:3, levels = 1:3)
classified(1:3, labels = letters[1:3])
# }
Run the code above in your browser using DataLab