Learn R Programming

labelVector (version 0.1.2)

extract_labelled: Extract or Replace Parts of Labelled Vectors

Description

Extraction and replacement methods for labelled vectors.

Usage

# S3 method for labelled
[(x, i, ...)

# S3 method for labelled [(x, i, ...) <- value

Arguments

x

An atomic vector inheriting the labelled class.

i

The elements to extract.

...

Arguments to pass to other methods.

value

typically a vector of similar class of length i

See Also

Extract

Examples

Run this code
# NOT RUN {
x <- set_label(1:10, "Integers")
x[1:3]

x[3] <- pi
x

# }

Run the code above in your browser using DataLab