Learn R Programming

specmine (version 1.0)

remove_data: Remove data

Description

Remove data from the dataset.

Usage

remove_data(dataset, data.to.remove, type = "sample", by.index = F, rebuild.factors = T)

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

Run this code
  ## Example of removing data
  data(cachexia)
  dataset = remove_data(cachexia, c("Creatine","Serine"), type = "data", 
	    by.index = FALSE)

Run the code above in your browser using DataLab