| read_spectra | R Documentation |
read_spectrum() reads a single spectrum from disk and returns it as
spectrum object. read_spectra() can be used to read multiple spectra at
once and returns a spectra object.
read_spectra(
data_path = pkg_file("example_datasets/bruker/urine"),
file_format = "bruker",
expno = 10,
procno = 10,
raw = FALSE,
silent = TRUE,
force = FALSE
)
data_path |
The path of the file/folder containing the spectrum data. E.g.
|
file_format |
The file_format of the spectrum file. E.g. |
expno, procno |
The experiment/processing number for the file. E.g. |
raw |
If |
silent |
If |
force |
If |
A spectrum object as described in Metabodecon Classes.
2024-2025 Tobias Schmidt: initial version.
relpath <- "example_datasets/bruker/urine"
urine <- system.file(relpath, package = "metabodecon")
urine_1 <- file.path(urine, "urine_1")
urine_2 <- file.path(urine, "urine_2")
x1 <- read_spectrum(urine_1)
x2 <- read_spectrum(urine_2)
xx <- read_spectra(urine)
str(xx)
str(x1)
stopifnot(all.equal(x1, xx$urine_1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.