-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.Rmd
71 lines (47 loc) · 1.91 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# assemblerr
<!-- badges: start -->
[![R-CMD-check](https://github.com/UUPharmacometrics/assemblerr/workflows/R-CMD-check/badge.svg)](https://github.com/UUPharmacometrics/assemblerr/actions)
[![Codecov test coverage](https://codecov.io/gh/UUPharmacometrics/assemblerr/branch/master/graph/badge.svg)](https://app.codecov.io/gh/UUPharmacometrics/assemblerr?branch=master)
[![CRAN status](https://www.r-pkg.org/badges/version/assemblerr)](https://CRAN.R-project.org/package=assemblerr)
<!-- badges: end -->
assemblerr is an R package to construct pharmacometric models by combining pre-defined model components. It's intended to simplify the specification of complex pharmacometric models and provide a mechanism to generate models in an automatic way. With assemblerr, models are specified using R code and then converted to a NONMEM control stream.
## Installation
You can install the latest CRAN version `assemblerr` using:
``` r
install.packages("assemblerr")
```
## Quick start
**Load assemblerr**
```{r}
library(assemblerr)
```
**Build a simple model**
```{r}
m <- model() +
input_variable("dose") +
prm_log_normal("emax", median = 10, var_log = 0.09) +
prm_log_normal("ed50", median = 50, var_log = 0.09) +
algebraic(effect~emax*dose/(ed50 + dose)) +
obs_additive(~effect, var_add = 1)
```
**Generate NONMEM code**
```{r}
render(m)
```
## Learning more
The best place to learn how to use assemblerr is the vignette "Getting Started". It provides an overview of the functionality in assemblerr and helps you building your own models. A simple way to find it is using the `vignette()` function in R:
``` r
vignette("getting-started", package = "assemblerr")
```