baytrends (version 1.1.0)

[.lcens: Subset an Object

Description

Extracts or subsets a vector: methods for "lcens," "mcens," and "qw" data.

Usage

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

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

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

# S3 method for qw subset(x, subset, ...)

Arguments

x

any R object to subset.

i

index specifying elements to extract.

not used, required for other methods.

subset

an logical expression involving a slot name of the qw object.

Value

A subset of the object x.

Details

The values for i can be either numeric indexes or logical. Valid slot names are "remark.codes," "reporting.level," "reporting.method," "reporting.units," "analyte.method," "analyte.name," and "unique.code."

See Also

[.qw

Examples

Run this code
# NOT RUN {
Xcens <- as.lcens(c(1, 2, 3, 4), 2)
# Extract the 3rd value
Xcens[3]
# Change the 3rd value to NA and print the data
Xcens[3,] <- NA
Xcens
# }

Run the code above in your browser using DataLab