Learn R Programming

yamlet (version 0.6.5)

[.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: [<-.classified(), [[.classified(), [[<-.classified(), c.classified(), classified.data.frame(), classified.default(), classified(), unclassified.classified(), unclassified.data.frame(), unclassified()

Examples

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

Run the code above in your browser using DataLab