R/standardizeZScore.R

Defines functions standardizeZScore

Documented in standardizeZScore

#' @title standardizeZScore
#'
#' @description
#' \code{standardizeZScore} Z-standardizes a vector.
#'
#' @details Centers a vector and divides it by its standard deviation.
#'
#' @author Jarrett Byrnes.
#' @param afun A vector of measurements of a function.

#'
#' @export
#' @return Returns a z-standardized vector.
#'


standardizeZScore <- function(afun) 
  (afun - mean(afun, na.rm = FALSE)) / stats::sd(afun, na.rm = TRUE)

Try the multifunc package in your browser

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

multifunc documentation built on May 25, 2022, 9:05 a.m.