subset_x_values: Subset x-values

Description Usage Arguments Value Examples

Description

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

Usage

1
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

1
2
3
4
  ## Example of subsetting x-values
  library(specmine.datasets)
  data(cachexia)
  subset = subset_x_values(cachexia, c(1,2,10,20), by.index = TRUE)

specmine documentation built on Sept. 21, 2021, 5:06 p.m.