Learn R Programming

specmine (version 1.0)

subset_x_values: Subset x-values

Description

Gets a subset of specific x-values from the dataset.

Usage

subset_x_values(dataset, variables, by.index = FALSE)

Arguments

dataset
list representing the dataset from a metabolomics experiment.
variables
vector with the desired variables to get from the dataset.
by.index
if TRUE, the values of the variables argument are indexes.

Value

Returns the dataset with the selected set of x-values.

Examples

Run this code
  ## Example of subsetting x-values
  data(cachexia)
  subset = subset_x_values(cachexia, c(1,2,10,20), by.index = TRUE)

Run the code above in your browser using DataLab