Skip to content

Commit

Permalink
Remove vignette code evaluation for syntax vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Sep 21, 2024
1 parent d559ff3 commit fcbb9fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions man/rmdhunks/rxode2-create-models.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
The ODE-based model specification may be coded inside four places:
The ODE-based model specification may be coded inside four places:

- Inside a `rxode2({})` block statements:

```{r modBracket}
``` r
library(rxode2)
mod <- rxode2({
# simple assignment
Expand All @@ -15,7 +15,7 @@ mod <- rxode2({

- Inside a `rxode2("")` string statement:

```{r modString}
``` r
mod <- rxode2("
# simple assignment
C2 <- centr/V2
Expand All @@ -27,7 +27,7 @@ mod <- rxode2("

- In a file name to be loaded by rxode2:

```{r modFile}
``` r
writeLines("
# simple assignment
C2 <- centr/V2
Expand All @@ -38,10 +38,10 @@ writeLines("
mod <- rxode2(filename='modelFile.rxode2')
unlink("modelFile.rxode2")
```

- In a model function which can be parsed by `rxode2`:

```{r modFun}
``` r
mod <- function() {
model({
# simple assignment
Expand Down Expand Up @@ -94,10 +94,10 @@ For the last type of model (a model function), a call to `rxode2`
creates a parsed `rxode2` ui that can be translated to the `rxode2`
compilation model.

```{r}
``` r
mod$simulationModel

# or
# or
mod$simulationIniModel
```

Expand Down
14 changes: 7 additions & 7 deletions vignettes/rxode2-syntax.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ knitr::opts_chunk$set(

## Introduction

This briefly describes the syntax used to define models
This briefly describes the syntax used to define models
that `rxode2` will translate into R-callable compiled code. It also
describes the communication of variables between `R` and the
`rxode2` modeling specification.
Expand All @@ -35,7 +35,7 @@ describes the communication of variables between `R` and the

## Bugs and/or deficiencies

- The modulo operator `%%` is currently unsupported.
- The modulo operator `%%` is currently unsupported.

## Note

Expand All @@ -49,10 +49,10 @@ Below is a commented example to quickly show the capabilities of

## Example

```{r}
``` r
f <- function() {
ini({

})
model({
# An rxode2 model specification (this line is a comment).
Expand Down Expand Up @@ -86,18 +86,18 @@ via the `d/dt(identifier)` operator as part of the model specification,
and which are model parameters via the `params=` argument in `rxode2`
`solve()` method:

```
``` r
m1 <- rxode2(model = ode, modName = "m1")

# model parameters -- a named vector is required
theta <-
theta <-
c(KA=0.29, CL=18.6, V2=40.2, Q=10.5, V3=297, Kin=1, Kout=1, EC50=200)

# state variables and their amounts at time 0 (the use of names is
# encouraged, but not required)
inits <- c(depot=0, centr=0, peri=0, eff=1)

# qd1 is an eventTable specification with a set of dosing and sampling
# qd1 is an eventTable specification with a set of dosing and sampling
# records (code not shown here)

solve(theta, event = qd1, inits = inits)
Expand Down

0 comments on commit fcbb9fe

Please sign in to comment.