Description Usage Arguments Details Value Examples
Get the header metadata and place it inside the @data slot
1 2 3 4 5 6 7 8 9 10 | spc.header2data(object, headerfield, dataname, compress, ...)
## S4 method for signature 'Spectra'
spc.header2data(object, headerfield, dataname, compress = TRUE, ...)
## S4 method for signature 'list'
spc.header2data(object, headerfield, dataname, compress = TRUE, ...)
## S4 method for signature 'SpcList'
spc.header2data(object, headerfield, dataname, compress = TRUE, ...)
|
object |
A |
headerfield |
character. Field name of the header to be copied. |
dataname |
character. Column name of @data slot to copy the incoming data. |
compress |
logical. Whether or not to compress data put into the header.
See help of |
... |
arguments to be passed to or from other methods |
If header element has length >1, its type is checked. If it is "character",
its elements will be pasted using paste(...,collapse="|"). If it is another
type, only the first element will be taken. For list and SpcList objects, the same
procedure is repeated for all elements of the list containing Spectra
objects.
If dataname
is missing, then it will be taken equal to headerfield
.
object of class Spectra
or SpcList
1 2 3 4 | sp <- spc.example_spectra()
sp <- spc.updateheader(sp,"Zone", "ZoneA")
sp <- spc.header2data(sp, "Zone")
sp$Zone
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.