View source: R/read-aster-file.r
| read_ASTER_txt | R Documentation | 
Reads and parses the header of a test file as available through the ASTER reflectance database. The Name field is retrieved and copied to attribute "what.measured". The header of the file is preserved as a comment.
read_ASTER_txt(
  file,
  date = NULL,
  geocode = NULL,
  label = NULL,
  tz = NULL,
  locale = readr::default_locale(),
  npixels = Inf
)
file | 
 character string  | 
date | 
 a   | 
geocode | 
 A data frame with columns   | 
label | 
 character string, but if   | 
tz | 
 character Ignored.  | 
locale | 
 The locale controls defaults that vary from place to place. The
default locale is US-centric (like R), but you can use
  | 
npixels | 
 integer Number of pixels in spectral data.  | 
A raw_spct object.
The header in these files has metadata information, but mostly on the
origin of the data. For a date and/or geocode are to be added to the return
object it must be supplied by the user.  as well as the date-time. Some
metadata is extracted and added as attributes, while the whole header is
copied to the comment attribute.
Baldridge, A.; Hook, S.; Grove, C. & Rivera, G. (2009) The ASTER spectral library version 2.0. Remote Sensing of Environment. 113, 711-715
 file.name <- 
   system.file("extdata", "drygrass-spectrum.txt", 
               package = "photobiologyInOut", mustWork = TRUE)
                
 fred.spct <- read_ASTER_txt(file = file.name, npixels = Inf)
 
 fred.spct
 getWhatMeasured(fred.spct)
 cat(comment(fred.spct))
 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.