aboutsummaryrefslogtreecommitdiff
path: root/vignettes/prebuilt/2022_dmta_pathway.rmd
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2023-04-20 20:17:12 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2023-04-20 20:17:12 +0200
commit7b7c4bf493ba15824ea43bed764661678b4aca03 (patch)
tree48de1e32327c36ee49fc476dc76ece8397ab55c6 /vignettes/prebuilt/2022_dmta_pathway.rmd
parent842998b688037c007d8876d7e1110c929fe2374c (diff)
parent9ae42bd20bc2543a94cf1581ba9820c2f9e3afbd (diff)
Merge branch 'v1.2.3_pkgdown'
Diffstat (limited to 'vignettes/prebuilt/2022_dmta_pathway.rmd')
-rw-r--r--vignettes/prebuilt/2022_dmta_pathway.rmd24
1 files changed, 18 insertions, 6 deletions
diff --git a/vignettes/prebuilt/2022_dmta_pathway.rmd b/vignettes/prebuilt/2022_dmta_pathway.rmd
index ff2b527c..1e1a0719 100644
--- a/vignettes/prebuilt/2022_dmta_pathway.rmd
+++ b/vignettes/prebuilt/2022_dmta_pathway.rmd
@@ -1,7 +1,7 @@
---
title: "Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P"
author: Johannes Ranke
-date: Last change on 8 January 2023, last compiled on `r format(Sys.time(), "%e %B %Y")`
+date: Last change on 20 April 2023, last compiled on `r format(Sys.time(), "%e %B %Y")`
geometry: margin=2cm
bibliography: references.bib
toc: true
@@ -45,10 +45,17 @@ library(knitr)
library(saemix)
library(parallel)
n_cores <- detectCores()
-if (Sys.info()["sysname"] == "Windows") {
- cl <- makePSOCKcluster(n_cores)
-} else {
- cl <- makeForkCluster(n_cores)
+
+# We need to start a new cluster after defining a compiled model that is
+# saved as a DLL to the user directory, therefore we define a function
+# This is used again after defining the pathway model
+start_cluster <- function(n_cores) {
+ if (Sys.info()["sysname"] == "Windows") {
+ ret <- makePSOCKcluster(n_cores)
+ } else {
+ ret <- makeForkCluster(n_cores)
+ }
+ return(ret)
}
```
@@ -163,6 +170,8 @@ m_hs_path_1 <- mkinmod(
unload = TRUE, overwrite = TRUE,
quiet = TRUE
)
+cl <- start_cluster(n_cores)
+
deg_mods_1 <- list(
sfo_path_1 = m_sfo_path_1,
fomc_path_1 = m_fomc_path_1,
@@ -332,6 +341,10 @@ plot(saem_sforb_path_1_tc_reduced)
Plots of the remaining fits and listings for all successful fits are shown in
the Appendix.
+```{r}
+stopCluster(cl)
+```
+
# Conclusions
@@ -410,7 +423,6 @@ tex_listing(saem_sforb_path_1_tc_reduced, caption)
## Session info
```{r, echo = FALSE}
-parallel::stopCluster(cl)
sessionInfo()
```

Contact - Imprint