R/center.R

Defines functions center

Documented in center

#' @title Matrix centering
#'
#' @description
#' C routine to row-center a matrix
#'
#' @param A matrix
#' @return `A` but row centered
#' @name center-deprecated
#' @usage center(A)
#' @seealso [lfa-deprecated()]
#' @keywords internal
NULL

#' @rdname lfa-deprecated
#' @section `center`:
#' For `center`, use `function(x) x - rowMeans(x)`.
#' @export
center <- function(A) {
    .Deprecated('function(x) x - rowMeans(x)')
    return(A - rowMeans(A))
}
StoreyLab/lfa documentation built on March 7, 2024, 9:59 p.m.