pull.rbiom: Map sample names to metadata field values.

pull.rbiomR Documentation

Map sample names to metadata field values.

Description

Map sample names to metadata field values.

Usage

## S3 method for class 'rbiom'
pull(biom, field = -1, name = ".sample", ...)

Arguments

biom

An rbiom object, such as from as_rbiom().

field

The metadata field name specified as:

  • The metadata field name to retrieve. Can be abbreviated.

  • A positive integer, giving the position counting from the left.

  • A negative integer, giving the position counting from the right.

Default: -1

name

The column to be used as names for a named vector. Specified in a similar manner as var. Default: ".sample"

...

Passed on to dplyr::pull().

Value

A vector of metadata values, named with sample names.

See Also

taxa_map()

Other samples: sample_sums()

Examples

    library(rbiom)
    
    pull(hmp50, 'Age') %>% head()
    
    pull(hmp50, 'bod') %>% head(4)
    

cmmr/rbiom documentation built on April 28, 2024, 6:38 a.m.