R/httkpop_biotophys_pfas.R

Defines functions httkpop_biotophys_pfas

Documented in httkpop_biotophys_pfas

#' Add resorption factor into httk-pop samples
#' 
#' @param parameters.dt The data.table object returned by \code{httkpop_generate()}
#'   
#' @param ... Additional arguments (ignored here)
#' 
#' @return A data.table with the physiological parameters expected by any HTTK 
#'   model, including body weight (BW), hematocrit, tissue volumes per kg body
#'   weight, tissue flows as fraction of CO, CO per (kg BW)^3/4, GFR per (kg
#'   BW)^3/4, portal vein flow per (kg BW)^3/4, and liver density.
#'
#'@author John Wambaugh
#'#'
#' @concept httk-pop 
#' @concept monte carlo
#'
#' @export httkpop_biotophys_pfas

httkpop_biotophys_pfas <- function(parameters.dt,
                                   ...)
{
  
  #R CMD CHECK throws notes about "no visible binding for global variable", for
  #each time a data.table column name is used without quotes. To appease R CMD
  #CHECK, a variable has to be created for each of these column names and set to
  #NULL. Note that within the data.table, these variables will not be NULL! Yes,
  #this is pointless and annoying.
  Qgfrc <- NULL
  resorption.factor <- NULL
  #End R CMD CHECK appeasement.
  
  parameters.dt[, Qgfrc:=(1-resorption.factor)*Qgfrc]

  return(parameters.dt)
}

Try the httk package in your browser

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

httk documentation built on Nov. 26, 2026, 9:08 a.m.