Skip to contents

Map sample names to metadata field values.

Usage

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

Arguments

.data

An rbiom object, such as from as_rbiom().

var

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"

...

Not used.

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()
#> HMP01 HMP02 HMP03 HMP04 HMP05 HMP06 
#>    22    24    28    25    27    32 
    
    pull(hmp50, 'bod') %>% head(4)
#>         HMP01         HMP02         HMP03         HMP04 
#> Buccal mucosa Buccal mucosa        Saliva        Saliva 
#> Levels: Anterior nares Buccal mucosa Mid vagina Saliva Stool