R/compute_minmax.R

Defines functions compute_min_max

Documented in compute_min_max

#' @title
#' Compute minimum and maximum
#'
#' @description
#' Function to compute minimum and maximum of the input vector
#'
#' @param x vector
#'
#' @return
#' Returns a vector of length 2. The first element is min value, and the second
#' element is max value.
#'
#' @keywords internal
#'
compute_min_max <- function(x) {

  min_x <- min(x, na.rm = TRUE)
  max_x <- max(x, na.rm = TRUE)

  return(c(min_x, max_x))
}

Try the CausalGPS package in your browser

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

CausalGPS documentation built on Sept. 30, 2023, 1:06 a.m.