View source: R/generateMetadata.R
generateMetadata | R Documentation |
generateMetadata
Generate the metadata from the list of raw spectra namely the samples, the experimental factors and the list of selected raw spectra. Depending on whether the sample matrix is supplied as input or not,
generateMetadata(RAWDIR, procParams, samples = NULL)
RAWDIR |
The full path of either the raw spectra directory on the disk |
procParams |
the list of processing parameters. First initialize this list with the |
samples |
the samples matrix with the correspondence of the raw spectra |
generateMetadata
returns a list containing the following components:
samples
: the samples matrix with the correspondence of the raw spectra, as well as the levels of the experimental factors if specified in the input.
factors
: the factors matrix with the corresponding factor names. At minimum, the list contains the Samplecode label corresponding to the samples without their group level.
rawids
: list of the full directories of the raw spectra (i.e. where the FID files are accessible)
data_dir <- system.file("extra", package = "Rnmr1D")
samplefile <- file.path(data_dir, "Samples.txt")
samples <- read.table(samplefile, sep="\t", header=TRUE,stringsAsFactors=FALSE)
metadata <- generateMetadata(data_dir, procParams=Spec1rProcpar, samples)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.