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

Description Usage Arguments Details Value See Also Examples

View source: R/SpcList-Methods.R

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

1
2
3
4
5
6
7
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.

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

Value

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

See Also

spc.makeSpcList

Examples

1
2
3
4
5
6
7
8
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)

geoSpectral documentation built on Feb. 20, 2020, 5:08 p.m.