R/weight_mat.R

Defines functions weight_mat

Documented in weight_mat

#' Convert dataframe to matrix
#'
#' @param data dataframe of weight
#'
#' @return A matrix
#' @export
#'
#' @examples
#' weight_mat(data = weight)
weight_mat <- function(data) {
  m <- as.matrix(data[, -1, drop = FALSE])
  m
}

Try the selection.index package in your browser

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

selection.index documentation built on March 9, 2026, 1:06 a.m.