Learn R Programming

specmine (version 1.0)

variables_as_metadata: Variables as metadata

Description

Use one or more data variables as metadata variables.

Usage

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

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
  ## Example of using a variable as metadata variable
  data(cachexia)
  dataset = variables_as_metadata(cachexia, "Creatine", by.index = FALSE)

Run the code above in your browser using DataLab