USGS: import USGS spectra

Description Usage Arguments Author(s) Examples

Description

Import and download spectral data from USGS spectral library

Usage

1
2
3
4
5
USGS_get_available_files(url = NULL)

USGS_retrieve_files(avl = USGS_get_available_files(), 
                    pattern = NULL, retrieve = TRUE, 
                    loadAsSpeclib = TRUE, tol = 0.1)

Arguments

url

Character passing the url of the data. If NULL, the following URL is used: 'ftp://ftpext.cr.usgs.gov/pub/cr/co/denver/speclab/pub/spectral.library/splib06.library/ASCII/'

avl

List of available files. Typically the result of USGS_get_available_files.

pattern

Search pattern to define a subset of all available spectra.

retrieve

Logical. Should the data be downloaded?

loadAsSpeclib

Logical. If TRUE, an object of class "Speclib" is retured

tol

Discrepancy of the wavelength values between different spectra.

Author(s)

Lukas Lehnert

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
## Retrieve all available spectra
avl <- USGS_get_available_files()

## Download all spectra matching "grass-fescue"
grass_spectra <- USGS_retrieve_files(avl = avl, pattern = "grass-fescue")

plot(grass_spectra)

## End(Not run)

hsdar documentation built on May 30, 2017, 6:23 a.m.