R/str.spectra.R

Defines functions str.spectra

Documented in str.spectra

#' Structure of `spectra` object
#'
#' @inheritParams wavelengths
#' @export
str.spectra <- function(spectra, ...) {
  wl <- wavelengths(spectra)
  wl_min <- min(wl)
  wl_max <- max(wl)
  n_spec <- ncol(spectra)
  n_wl <- nrow(spectra)
  string <- sprintf(
    "'spectra':\t %d obs, %d - %d nm (%d x %d)\n",
    n_spec,
    wl_min,
    wl_max,
    n_wl,
    n_spec
  )
  cat(string)
  invisible()
}
ashiklom/PEcAnRTM documentation built on March 7, 2020, 7:46 a.m.