Learn R Programming

specmine (version 3.1.6)

remove_data: Remove data

Description

Remove data from the dataset.

Usage

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

Run this code
# NOT RUN {
  ## Example of removing data
  library(specmine.datasets)
  data(cachexia)
  dataset = remove_data(cachexia, c("Creatine","Serine"), type = "data", 
	    by.index = FALSE)
# }

Run the code above in your browser using DataLab