Create dataset

Description

Create a dataset from existing objects

Usage

1
2
3
create_dataset(datamatrix, type = "undefined", metadata = NULL, 
description = "", sample.names = NULL, x.axis.values = NULL,
label.x = NULL, label.values = NULL, xSet = NULL)

Arguments

datamatrix

matrix with numerical data: rows are assumed to be variables and columns assumed to be samples.

type

type of data: string that can be one of the following:

  • nmr-spectra

  • nmr-peaks

  • ir-spectra

  • uvv-spectra

  • raman-spectra

  • fluor-spectra

  • ms-spectra

  • lcms-peaks

  • gcms-peaks

  • integrated-data

  • concentrations

  • undefined

metadata

data frame with the dataset's metadata: columns represent each metadata variable and rows represent the value of the metadata for the sample.

description

string with a short description of the dataset.

sample.names

vector with sample names, if NULL then the column names of datamatrix or sequential numbers will be used.

x.axis.values

vector with the x axis values, if NULL then the row names of datamatrix or sequential numbers will be used.

label.x

x axis label.

label.values

values label.

xSet

xcmsSet object from xcms package to store the reading and preprocessing results from MS spectra. Used for metabolite identification purposes.

Value

list representing the dataset:

data

matrix with the data

type

type of the data

description

short description of the dataset

metadata

data frame with the metadata variables

labels

list with labels of x axis and values

xSet

xcmsSet object

Examples

1
2
3
4
5
6
7
8
## Not run: 
  ## Example of creating a dataset
  dataset = create_dataset(datamatrix, type = "nmr-spectra", 
	metadata = dataset.metadata, description = "shortdescription", 
	sample.names = NULL, x.axis.values = NULL, label.x = "ppm", 
	label.values = "intensity")

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.