R/kmsf2basis.R

Defines functions kmsf2basis

Documented in kmsf2basis

#' Derive a basis from a surmise function
#'
#' \code{kmsf2basis} expects a surmise function data frame
#' and returns the corresponding basis.
#'
#' @param sf Surmise function
#'
#' @return Matrix representing the basis.
#'
#' @export
kmsf2basis <- function(sf) {
  noc <- dim(sf)[2]
  unique(apply(as.matrix(sf[, 2:noc]), 2, as.numeric))
}

Try the kstMatrix package in your browser

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

kstMatrix documentation built on Oct. 12, 2023, 5:06 p.m.