addMetadata | R Documentation |
AbstractMassObject
class objects
This function adds metadata to the metaData
slot of an AbstractMassObject-class
class object.
addMetadata(x, metadata, pos)
x |
List of |
metadata |
Vector containing the metadata to be included for each element of |
pos |
Position of the new metadata within the |
List of AbstractMassObject-class
class objects including the new metadata in their metaData
slot.
# Load example data
data(spectra) # list of MassSpectra class objects
data(type) # metadata
# Add metadata
info <- paste("Spectrum No.",1:length(spectra)) # Artificial metadata vector
spectra2 <- addMetadata(spectra,info,1)
# Check info in metaData slot
spectra2[[1]]@metaData
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.