| create_dataset | R Documentation |
Creates a dataset from a numeric matrix.
create_dataset(
datamatrix,
type = "undefined",
metadata = NULL,
description = "",
sample.names = NULL,
x.axis.values = NULL,
label.x = NULL,
label.values = NULL,
xSet = NULL
)
datamatrix |
Matrix with numerical data; rows are variables and columns are samples. |
type |
Type of data, such as "nmr-spectra", "nmr-peaks", "ir-spectra", "uvv-spectra", "concentrations", or "undefined". |
metadata |
Optional metadata as a data frame or matrix. |
description |
Dataset description. |
sample.names |
Optional sample names. |
x.axis.values |
Optional x-axis values. |
label.x |
Optional x-axis label. |
label.values |
Optional value label. |
xSet |
Optional xSet object. |
A list representing a specmine dataset. The returned object contains at least the elements
data, a numeric matrix with variables in rows and samples in columns; type, a character
string identifying the dataset type; description, a character string describing the dataset;
metadata, a data frame with one row per sample when available; labels, a list with axis
and value labels when provided; and xSet, an optional object associated with LC-MS processing.
This object is the standard input structure used by downstream specmine analysis functions.
datamatrix <- matrix(
c(1.1, 2.2, 3.3, 4.4, 5.5, 6.6),
nrow = 2,
dimnames = list(NULL, NULL)
)
metadata <- data.frame(
class = c("A", "B", "A"),
row.names = c("s1", "s2", "s3")
)
create_dataset(
datamatrix,
type = "concentrations",
metadata = metadata,
sample.names = c("s1", "s2", "s3"),
x.axis.values = c("v1", "v2"),
label.x = "variable",
label.values = "intensity"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.