variables_as_metadata: Variables as metadata

Description Usage Arguments Value Examples

View source: R/structure.R

Description

Use one or more data variables as metadata variables.

Usage

1
  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

1
2
3
4
  ## Example of using a variable as metadata variable
  library(specmine.datasets)
  data(cachexia)
  dataset = variables_as_metadata(cachexia, "Creatine", by.index = FALSE)

specmine documentation built on Sept. 21, 2021, 5:06 p.m.