Learn R Programming

specmine (version 3.1.6)

variables_as_metadata: Variables as metadata

Description

Use one or more data variables as metadata variables.

Usage

variables_as_metadata(dataset, variables, by.index = FALSE)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

variables

name or index of the variables that are going to be used as metadata variables.

by.index

boolean value indicating if the variables are indexes or names

Value

Returns the dataset with the variables removed from the data and added on the metadata.

Examples

Run this code
# NOT RUN {
  ## Example of using a variable as metadata variable
  library(specmine.datasets)
  data(cachexia)
  dataset = variables_as_metadata(cachexia, "Creatine", by.index = FALSE)
# }

Run the code above in your browser using DataLab