R/acceptance_rate.R

Defines functions acceptance_rate

# Not exported
acceptance_rate <- function(.x) {
  len_x <- length(.x)
  
  s <- sum(.x[1:(len_x-1)] == .x[2:len_x])
  
  return(1 - s/(len_x - 1))
}

Try the BGPhazard package in your browser

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

BGPhazard documentation built on Sept. 3, 2023, 5:09 p.m.