Spectra
objectsGiven a list of Spectra
objects, this function creates a STIDF object summarizing the
spatial and temporal variability of the input dataset. Upon request, it also includes
data columns.
spc.make.stindex(
input,
what2include = "",
rowSimplify = "none",
includeTIME = FALSE,
includeLATLON = FALSE
)
An object of class spectra
A character variable giving the data columns to be included in the output
Either of "none", "spc.colMeans","firstRow" or "lastRow". Default is "none"
Logical. Whether of not to include TIME data in the output STIDF object. Default is FALSE.
Logical. Whether of not to include LAT&LON data in the output STIDF object. Default is FALSE.
An object of class STIDF
. Each row of the output object has a space and time
characteristics depending of the input argument rowSimplify
.
This function accepts a list of Spectra
objects and outputs one STIDF object summarizing
spatial and temporal variation of the input dataset.
If rowSimplify="none", length of the output object will be equal to the sum of all rows of all elements of the input list object.
If rowSimplify="spc.colMeans", length of the output object will be equal to the number of rows of the input list object. This option returns the measurement nearest to the average time of each element of the input list.
firstRow and lastRow : length of the output object equals the number of rows of the input list object. These two options return the first and last measurements of the input list element
# NOT RUN {
sp = spc.example_spectra()
BL = spc.makeSpcList(sp,"STATION")
stidx = spc.make.stindex(BL)
dim(stidx)
stidx = spc.make.stindex(BL, what2include = "CAST")
head(stidx@data)
stidx = spc.make.stindex(BL, rowSimplify="spc.colMeans")
dim(stidx)
# }
Run the code above in your browser using DataLab