Learn R Programming

specmine (version 3.0.2)

subset_samples: Subset samples

Description

Gets a subset of specific samples from the dataset.

Usage

subset_samples(dataset, samples, rebuild.factors = TRUE)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

samples

vector with indexes or names of the samples to select

rebuild.factors

if TRUE the metadata factors are rebuilded.

Value

Returns the dataset with the selected set of samples.

Examples

Run this code
# NOT RUN {
  ## Example of subsetting samples
  data(cachexia)
  subset = subset_samples(cachexia, c("PIF_178","PIF_132"))
# }

Run the code above in your browser using DataLab