You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' Cumulative Median#' #' @family Vector Function#' #' @author Steven P. Sanderson II, MPH#' #' @details#' A function to return the cumulative median of a vector.#' #' @description #' A function to return the cumulative median of a vector.#' #' @parm .x A numeric vector#' #' @examples #' x <- mtcars$mpg#' #' cmedian(x)#' #' @return #' A numeric vector#' #' @export#' cmedian<-function(.x){
sapply(seq_along(.x), function(k, z) stats::median(z[1:k]), z=.x)
}
Function:
Example:
The text was updated successfully, but these errors were encountered: