metadata_as_variables: Metadata as variables

Description Usage Arguments Value Examples

View source: R/structure.R

Description

Use one or more metadata variables as variables.

Usage

1
  metadata_as_variables(dataset, metadata.vars, by.index = FALSE)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

metadata.vars

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

by.index

boolean value indicating if the metadata variables are indexes or names

Value

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

Examples

1
2
3
4
  ## Example of using a metadata variable as data variable
  library(specmine.datasets)
  data(propolis)
  propolis = metadata_as_variables(propolis, "seasons", by.index = FALSE)

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