SpectraPoints: A class for spectral absorbance measurements

Description Details Slots Methods Author(s) See Also Examples

View source: R/spectra.R

Description

A class for spectral absorbance measurements typically in the medium infra-red range (MIR), visible near infra-red (VISMIR) and near-infra-red.

Details

The class expects by default absorbance, and not reflectance values. For large data sets we advise using the wide data format.

Slots

metadata:

object of class "data.frame"; metadata table containg relevant information such as "MID" (metadata ID), "Instrument_name", "Instrument_URL", "Laboratory_name", "Laboratory_contact" (contact person and his/her e-mail address), "Laboratory_URL", "Material_class" (e.g. soil or vegetation), "Wavenumber_conversion", "Wavenlength_unit", "Location_error"

data:

object of class "Spectra"; contains absorbance values in wide or long format

sp:

object of class "SpatialPoints"; sampling locations

Methods

summary

signature(obj = "SpectraPoints"): default summary of the object showing number of bands and points

validate

signature(obj = "SpectraPoints"): check for overlap in feature space in comparison to the calibration data

Author(s)

Tomislav Hengl and Andrew Sila

See Also

fit.SpectraModel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 
## generate the class:
library(sp)
library(rgdal)

data(afspec)
## get spatial coordinates:
sp <- afspec$samples[,c("Longitude","Latitude")]
coordinates(sp) <- ~Longitude+Latitude
proj4string(sp) <- CRS("+proj=longlat +datum=WGS84")
## prepare 'samples' table
samples <- cbind(afspec$samples["SAMPLEID"], 
    MID="AfSIS-MIR", 
    DateTime=Sys.time())
## convert to "SpectraPoints"
afspec.sp <- SpectraPoints(Spectra=Spectra(samples, afspec$ab), sp=sp)
summary(afspec.sp)
plot(afspec.sp@data)
data(m.PHIHOX)

soil.spec documentation built on May 30, 2017, 2:19 a.m.