Learn R Programming

specmine (version 1.0)

subset_samples_by_metadata_values: Subset samples by metadata values

Description

Gets a subset of specific samples according to metadata's values from the dataset.

Usage

subset_samples_by_metadata_values(dataset, metadata.varname, values)

Arguments

dataset
list representing the dataset from a metabolomics experiment.
metadata.varname
name of the metadata's variable.
values
values of the metadata's variable.

Value

Returns the dataset with the set of samples according to the metadata's values.

Examples

Run this code
  ## Example of subsetting samples by metadata's values
  data(cassavaPPD)
  subset = subset_samples_by_metadata_values(cassavaPPD, "varieties", 
	   c("BRA","IAC"))

Run the code above in your browser using DataLab