filter_data: Filter samples from dataset

View source: R/input_output_filter.R

filter_dataR Documentation

Filter samples from dataset

Description

Filter out or keep particular samples in a dataset based on contextual metadata.

Usage

filter_data(input, filter_cat, filter_vals, keep_vals)

Arguments

input

The input dataset as loaded by load_taxa_table.

filter_cat

The map_fp header string for the factor you would like to use to filter samples.

filter_vals

The values within the filter category (vector or single value) you would like to use to remove samples from the imported data.

keep_vals

Alternatively, keep only samples represented by these values.

Value

A list variable with (1) the loaded taxa table, (2) the loaded mapping file, and optionally (3) the loaded taxonomy information.

Examples

## Not run: 
ex_in_filt = filter_data(input = "example_input", filter_cat = "Sample_type",
                         filter_vals = c("mushrooms", "strawberries"))

## End(Not run)

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