tests/pbtk_test.R

# R CMD BATCH --no-timing --no-restore --no-save pbtk_test.R pbtk_test.Rout

# Get rid of anything in the workspace:
rm(list=ls()) 

library(httk)

calc_analytic_css(chem.name="bisphenol a",model="pbtk")
calc_analytic_css(chem.cas="80-05-7",model="pbtk")
calc_analytic_css(parameters=parameterize_pbtk(chem.cas="80-05-7"),model="pbtk")
calc_analytic_css(chem.name="bisphenol a",model="pbtk",tissue="liver")
calc_analytic_css(chem.name="bisphenol a",model="pbtk",tissue="brain")

head(solve_pbtk(chem.name="bisphenol a",days=1))
head(solve_pbtk(chem.cas="80-05-7",days=1))
head(solve_pbtk(parameters=parameterize_pbtk(chem.cas="80-05-7"),days=1))

p <- parameterize_pbtk(chem.name="Aminopterin")[sort(names(parameterize_pbtk(chem.name="Aminopterin")))]
# Try to standardize order of variable names
for (this.param in names(p)[order(toupper(names(p)))]) cat(paste(this.param,": ",p[[this.param]],"\r\n",sep=""))

quit("no")

Try the httk package in your browser

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

httk documentation built on Sept. 11, 2024, 9:32 p.m.