to_ASICS | R Documentation |
Exports the spectra matrix, sample names and chemical shift axis into an ASICS Spectra object.
to_ASICS(dataset, ...)
dataset |
An nmr_dataset_1D object |
... |
Arguments passed on to
|
An ASICS::Spectra object
if (requireNamespace("ASICS", quietly=TRUE)) {
nsamp <- 3
npoints <- 300
metadata <- list(external = data.frame(
NMRExperiment = paste0("Sample", seq_len(nsamp))
))
dataset <- new_nmr_dataset_1D(
ppm_axis = seq(from = 0.2, to = 10, length.out = npoints),
data_1r = matrix(runif(nsamp * npoints), nrow = nsamp, ncol = npoints),
metadata = metadata
)
forAsics <- to_ASICS(dataset)
#ASICS::ASICS(forAsics)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.