Learn R Programming

specmine (version 4.0.0)

convert_from_chemospec: Auto-exported function: convert_from_chemospec

Description

Auto-exported function: convert_from_chemospec

Usage

convert_from_chemospec(csobj, type = "undefined", description = "")

Arguments

Value

A dataset object converted from a ChemoSpec object, containing the transposed data matrix, metadata, sample names, and axis/unit labels.

Examples

Run this code
csobj <- list(
  data = matrix(c(10, 20, 30, 40), nrow = 2, byrow = TRUE),
  freq = c(1, 2),
  groups = c("A", "B"),
  names = c("sample1", "sample2"),
  unit = c("ppm", "intensity")
)
dataset <- convert_from_chemospec(csobj)
class(dataset)

Run the code above in your browser using DataLab