R/computeSF2.R

Defines functions computeSF2

Documented in computeSF2

#' Compute SF2
#'
#' @description This function computes the survival fraction after administering 2 units of radiation, given alpha and beta in the equation SF = exp(-alpha * D - beta * D ^ 2).
#' @param pars parameters (alpha, beta) in equation y = exp(-alpha * x - beta * x ^ 2)
#' @examples computeSF2(c(0.2, 0.1))
#' @export

computeSF2 <- function(pars) {

  CoreGx::.sanitizeInput(pars = pars,
                          x_as_log = FALSE,
                          y_as_log = FALSE,
                          y_as_pct = FALSE,
                          trunc = FALSE,
                          verbose = FALSE)

  SF <- .linearQuadratic(D = 2,
                         pars = pars,
                         SF_as_log = FALSE)

  # if (!SF_as_log) {
    # SF <- exp(SF)
  # }

  return(SF)
}

Try the RadioGx package in your browser

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

RadioGx documentation built on Dec. 20, 2019, 1:06 a.m.