diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2016-11-17 18:14:32 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2016-11-17 18:23:31 +0100 |
commit | f3f415520c89f9d8526bf6fadc862ebd44be220d (patch) | |
tree | e80d26e3b4f56ebe872888bed8f01a21d49b7ff4 /vignettes/compiled_models.Rmd | |
parent | f52fffd9eab13b7902bf767dd9cd7f0e7abf8069 (diff) |
Remove trailing whitespace, clean headers
Also ignore test.R in the top level directory, as it is not meant to
be public
Diffstat (limited to 'vignettes/compiled_models.Rmd')
-rw-r--r-- | vignettes/compiled_models.Rmd | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vignettes/compiled_models.Rmd b/vignettes/compiled_models.Rmd index 9fd39d81..18e1a462 100644 --- a/vignettes/compiled_models.Rmd +++ b/vignettes/compiled_models.Rmd @@ -25,7 +25,7 @@ This evaluation is taken from the example section of mkinfit. When using an mkin equal to or greater than 0.9-36 and a C compiler (gcc) is available, you will see
a message that the model is being compiled from autogenerated C code when
defining a model using mkinmod. The `mkinmod()` function checks for presence of
-the gcc compiler using
+the gcc compiler using
```{r check_gcc}
Sys.which("gcc")
@@ -48,12 +48,12 @@ the microbenchmark package. library("microbenchmark")
library("ggplot2")
mb.1 <- microbenchmark(
- "deSolve, not compiled" = mkinfit(SFO_SFO, FOCUS_2006_D,
- solution_type = "deSolve",
+ "deSolve, not compiled" = mkinfit(SFO_SFO, FOCUS_2006_D,
+ solution_type = "deSolve",
use_compiled = FALSE, quiet = TRUE),
- "Eigenvalue based" = mkinfit(SFO_SFO, FOCUS_2006_D,
+ "Eigenvalue based" = mkinfit(SFO_SFO, FOCUS_2006_D,
solution_type = "eigen", quiet = TRUE),
- "deSolve, compiled" = mkinfit(SFO_SFO, FOCUS_2006_D,
+ "deSolve, compiled" = mkinfit(SFO_SFO, FOCUS_2006_D,
solution_type = "deSolve", quiet = TRUE),
times = 3, control = list(warmup = 0))
@@ -62,8 +62,8 @@ print(mb.1) autoplot(mb.1)
```
-We see that using the compiled model is by a factor of
-`r round(smb.1[1, "median"]/smb.1[3, "median"], 1)`
+We see that using the compiled model is by a factor of
+`r round(smb.1[1, "median"]/smb.1[3, "median"], 1)`
faster than using the R version with the default ode solver, and it is even
faster than the Eigenvalue based solution implemented in R which does not need
iterative solution of the ODEs:
@@ -75,7 +75,7 @@ smb.1["median"]/smb.1["deSolve, compiled", "median"] ## Model that can not be solved with Eigenvalues
-This evaluation is also taken from the example section of mkinfit.
+This evaluation is also taken from the example section of mkinfit.
```{r benchmark_FOMC_SFO, fig.height = 3}
FOMC_SFO <- mkinmod(
@@ -83,7 +83,7 @@ FOMC_SFO <- mkinmod( m1 = mkinsub( "SFO"))
mb.2 <- microbenchmark(
- "deSolve, not compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D,
+ "deSolve, not compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D,
use_compiled = FALSE, quiet = TRUE),
"deSolve, compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE),
times = 3, control = list(warmup = 0))
@@ -93,8 +93,8 @@ smb.2["median"]/smb.2["deSolve, compiled", "median"] autoplot(mb.2)
```
-Here we get a performance benefit of a factor of
-`r round(smb.2[1, "median"]/smb.2[2, "median"], 1)`
+Here we get a performance benefit of a factor of
+`r round(smb.2[1, "median"]/smb.2[2, "median"], 1)`
using the version of the differential equation model compiled from C code!
This vignette was built with mkin `r packageVersion("mkin")` on
|