R/indicator_matrix.R

Defines functions indicator_matrix

Documented in indicator_matrix

#### Make a univariate indicator matrix ####

#' @include RcppExports.R
NULL

#' Construct an indicator matrix
#'
#' From a vector \code{x}, construct an indicator matrix
#'
#' @usage indicator_matrix( x )
#' @param x A \code{numeric} vector
#'
#' @return A matirx with the rows as the length of \code{x} and columns the number of unique \code{x} values.
#'
#' @export indicator_matrix

indicator_matrix = function( x ){
    CAB_cpp_indicator_matrix(x)
}
Don-Li/CAB documentation built on May 6, 2019, 2:52 p.m.