rename_samples: Rename samples in an mctoolsr dataset

View source: R/utils.R

rename_samplesR Documentation

Rename samples in an mctoolsr dataset

Description

Rename the samples by substituting column names in the taxa table and row names in the metadata map with values from a metadata map column that you specify. Note that all values in the metadata map column must be unique.

Usage

rename_samples(input, name_header)

Arguments

input

The input dataset as loaded by load_taxa_table.

name_header

The header value in the metadata map that will be used to rename the samples.

Examples

fruits_veggies$map_loaded$alt_id =
paste0('alt', 1:nrow(fruits_veggies$map_loaded))
rename_samples(fruits_veggies, 'alt_id')

leffj/mctoolsr documentation built on Aug. 5, 2022, 1:27 a.m.