powered by
Remove data from the dataset.
remove_data(dataset, data.to.remove, type = "sample", by.index = FALSE, rebuild.factors = TRUE)
list representing the dataset from a metabolomics experiment.
vector with the elements' names to remove
type of the element to remove. It can be:
"sample" to remove samples.
"data" to remove variables.
"metadata" to remove metadata's variables.
if TRUE, the values of the data.to.remove argument are indexes in case the type is "data".
if TRUE, rebuilds the factors from metadata.
Returns the dataset with the specified data removed.
# 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