R/c_fun.R

Defines functions c_fun

Documented in c_fun

#' Compute the difference between mean of subvectors of two vectors
#'
#' @param i starting index
#' @param i_t final index
#' @param y first vector of elements
#' @param z second vector of elements
#'
#' @return a real, the difference between means of subvectors of two vectors
#' @export
#'
#' @examples
c_fun <- function(i,i_t, y ,z){
  res <- mean(y[(i_t+1):i]) -  mean(z[(i_t+1):i])
  return(res)
}

Try the RationalExp package in your browser

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

RationalExp documentation built on May 2, 2019, 2:07 a.m.