powered by
When subsetting a vector by "[", all annotations (e.g., label and unit of measurement) are preserved.
# S4 method for annotated_vector [(x, i)# S4 method for annotated_named_vector [(x, i)# S4 method for annotated_factor [(x, i)# S4 method for annotated_named_factor [(x, i)
# S4 method for annotated_named_vector [(x, i)
# S4 method for annotated_factor [(x, i)
# S4 method for annotated_named_factor [(x, i)
The annotated_vector object to be subsetted.
An index specifying elements to extract or replace.
base::`[`
# NOT RUN { a <- new("annotated_numeric", .Data = 1:4) test <- a[1:2] # }
Run the code above in your browser using DataLab