R/center.R

Defines functions center

Documented in center

#' Mean-center a variable
#' 
#' This is a convenience function equal to scale(x, scale=FALSE)
#' 
#' @param x Numeric vector
#' @examples
#' data(anchoring)
#' center(anchoring$everest_feet)
#' @export
center <- function(x) {
  return(scale(x, scale = FALSE))
}

Try the sdamr package in your browser

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

sdamr documentation built on Nov. 19, 2020, 3 a.m.