Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

geoSpectral (version 0.17.5)

spc.make.stindex: Create a spatio-temporal index based on a list of Spectra objects

Description

Given 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.

Usage

spc.make.stindex(
  input,
  what2include = "",
  rowSimplify = "none",
  includeTIME = FALSE,
  includeLATLON = FALSE
)

Arguments

input

An object of class spectra

what2include

A character variable giving the data columns to be included in the output

rowSimplify

Either of "none", "spc.colMeans","firstRow" or "lastRow". Default is "none"

includeTIME

Logical. Whether of not to include TIME data in the output STIDF object. Default is FALSE.

includeLATLON

Logical. Whether of not to include LAT&LON data in the output STIDF object. Default is FALSE.

Value

An object of class STIDF. Each row of the output object has a space and time characteristics depending of the input argument rowSimplify.

Details

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

See Also

spc.makeSpcList

Examples

Run this code
# 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