sub_annotated: Subsetting of Annotated Vectors

Description Usage Arguments See Also Examples

Description

When subsetting a vector by "[", all annotations (e.g., label and unit of measurement) are preserved.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'annotated_vector'
x[i]

## S4 method for signature 'annotated_named_vector'
x[i]

## S4 method for signature 'annotated_factor'
x[i]

## S4 method for signature 'annotated_named_factor'
x[i]

Arguments

x

The annotated_vector object to be subsetted.

i

An index specifying elements to extract or replace.

See Also

base::'['

Examples

1
2
a <- new("annotated_numeric", .Data = 1:4)
test <- a[1:2]

mariusbarth/annotate4 documentation built on May 7, 2019, 3:14 p.m.