USGS: import USGS spectra

import_USGSR Documentation

import USGS spectra

Description

Import and download spectral data from USGS spectral library

Usage

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

## 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 March 18, 2022, 6:35 p.m.