subset_by_samples_and_xvalues: Subset by samples and x-values

Description Usage Arguments Value Examples

Description

Gets a subset of specific samples and x-values.

Usage

1
2
subset_by_samples_and_xvalues(dataset, samples, variables = NULL, 
by.index = FALSE, variable.bounds = NULL, rebuild.factors = TRUE)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

samples

vector with indexes or names of the samples to select

variables

vector with the desired variables to get from the dataset.

by.index

if TRUE, the values of the variables argument are indexes.

variable.bounds

variable bounds used if by.index is FALSE and variables are NULL.

rebuild.factors

if TRUE the metadata factors are rebuilded.

Value

Returns the dataset with the selected samples and x-values.

Examples

1
2
3
4
5
  ## Example of subsetting samples and x-values
  library(specmine.datasets)
  data(cachexia)
  subset = subset_by_samples_and_xvalues(cachexia, c("PIF_178","NETL_022_V1"), 
	   variables = c("Creatine","Serine"))

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