R/calc_t12.R

#' Calculate half-life based on two points
#'
#' based on two sampling points (in same interval)
#'
#' @param t1 first sampling timepoint
#' @param t2 second sampling timepoint
#' @param y1 first sample value
#' @param y2 second sample value
#' @export
calc_t12 <- function(t1, t2, y1, y2) {
  log(2) / (log(y1)-log(y2)) * (t2-t1)
}
ronkeizer/PKmisc documentation built on May 27, 2019, 1:50 p.m.