remove_data: Remove data

Description Usage Arguments Value Examples

Description

Remove data from the dataset.

Usage

1
2
remove_data(dataset, data.to.remove, type = "sample", 
by.index = FALSE, rebuild.factors = TRUE)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

data.to.remove

vector with the elements' names to remove

type

type of the element to remove. It can be:

  • "sample" to remove samples.

  • "data" to remove variables.

  • "metadata" to remove metadata's variables.

by.index

if TRUE, the values of the data.to.remove argument are indexes in case the type is "data".

rebuild.factors

if TRUE, rebuilds the factors from metadata.

Value

Returns the dataset with the specified data removed.

Examples

1
2
3
4
5
  ## Example of removing data
  library(specmine.datasets)
  data(cachexia)
  dataset = remove_data(cachexia, c("Creatine","Serine"), type = "data", 
	    by.index = FALSE)

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