#' 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()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.