R/sampleDist.Spectra.R

Defines functions sampleDist.Spectra

#'
#' sampleDist.Spectra
#'
#' @author `r .writeDoc_Authors("BH")`
#' @export
#' @noRd
#'
sampleDist.Spectra <- function(spectra, method = "pearson", plot = TRUE, ...) {
  .chkArgs(mode = 11L)
  chkSpectra(spectra)

  M <- rowDist(spectra$data, method)
  M <- as.matrix(M)
  dimnames(M) <- list(spectra$names, spectra$names)

  if (plot) .distPlot(spectra, M, method, ...)

  M
}

Try the ChemoSpecUtils package in your browser

Any scripts or data that you put into this service are public.

ChemoSpecUtils documentation built on May 29, 2024, 3:12 a.m.