Learn R Programming

yamlet (version 0.5.3)

[.classified: Subset Classified.

Description

Subsets classified factor, retaining attributes.

Usage

# S3 method for classified
[(x, ...)

Arguments

x

classified factor

...

passed to next method

Value

class 'classified' 'factor'

See Also

Other classified: as_classified.factor(), as_classified()

Examples

Run this code
# NOT RUN {
a <- as_classified(factor(letters))
attr(a, 'label') <- 'foo'
a <- a[1:3]
attributes(a)
# }

Run the code above in your browser using DataLab