R/kmSR2basis.R

Defines functions kmSR2basis

Documented in kmSR2basis

#' Determine the basis of a knowledge space from a surmise relation
#'
#' \code{kmSR2basis} takes a surmise relation and returns the
#' corresponding basis.
#'
#' @param sr Surmise relation
#' @return Basis
#'
#' @family Different representations for knowledge spaces
#'
#' @export
kmSR2basis <- function(sr) {
  mat <- unique(t(sr))
  class(mat) <- unique(c("kmbasis", "kmfamset", class(mat)))
  mat
}

Try the kstMatrix package in your browser

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

kstMatrix documentation built on Dec. 18, 2025, 5:07 p.m.