Learn R Programming

specmine (version 3.1.6)

merge_data_metadata: Merge data and metadata

Description

Merges the data and metadata from the dataset into a single data.frame.

Usage

merge_data_metadata(dataset, samples = NULL, 
metadata.vars = NULL, x.values = NULL, by.index = FALSE)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

samples

vector with indexes or names of the samples to select

metadata.vars

metadata's variables.

x.values

vector with the desired x-values to get from the dataset.

by.index

if TRUE, the values of the x.values argument are indexes.

Value

Returns a data.frame with the data and metadata from the dataset merged.

Examples

Run this code
# NOT RUN {
  ## Example of merging data and metadata
  library(specmine.datasets)
  data(cachexia)
  dt.merged = merge_data_metadata(cachexia)
# }

Run the code above in your browser using DataLab