---
title: "Modeling Using PLETHEM"
author: "Salil N. Pendse"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Modeling Using PLETHEM}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

# Installing PLETHEM
PLETHEM can be run installed from CRAN 
```{r eval = F}
install.packages(plethem)
```
The most recent development version can be installed from 
```{r eval = F}
devtools::install_github("Scitovation/plethem")
```
and then use 
```{r eval = F}
library(plethem)
```
to start using PLETHEM
## Running rapidPBPK models
The rapidPBPK model within PLETHEM can be used to run forward dosimetry, monte carlo analysis, reverse dosimetry, and route to route extrapolation workflows. 
To start the rapidPBPK application
```{r eval = F}
interactivePBPK()
```
## Running HT-IVIVE models in PLETHEM
The High-Throughput IVIVE workflow within PELTHEM can be used to extrapolate in vitro points of depature to equivalent applied dose in vivo
TO start the HT-IVIVE application
```{r eval = F}
interactiveHT()
```
## Running HTTK models 
Models within the HTTK package can also be run using the same interactive modeling interface you saw previously. These models require the chemicals be a part of HTTK's internal chemical database. Chemicals can be added to httk's chemical database using the httk function
```{r eval = FALSE}
httk::add_chemtable(table)
```
This can be simplified if you are using RStudio. The gadget developed for adding data to httk's chemical database can be invoked by running the command
```{r eval = FALSE}
addChemsToHTTK()
```
Once the chemical is added to the HTTK database, a new httk PBPK project can be created by using the commands above but replacing value of the parameter model to "httk_pbtk"