aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DESCRIPTION2
-rw-r--r--NEWS.md6
-rw-r--r--docs/articles/FOCUS_D.html8
-rw-r--r--docs/articles/FOCUS_L.html40
-rw-r--r--docs/articles/mkin.html2
-rw-r--r--docs/articles/twa.html2
-rw-r--r--docs/articles/web_only/FOCUS_Z.html2
-rw-r--r--docs/articles/web_only/NAFTA_examples.html2
-rw-r--r--docs/articles/web_only/benchmarks.html24
-rw-r--r--docs/articles/web_only/compiled_models.html12
-rw-r--r--docs/news/index.html9
-rw-r--r--docs/reference/mkinfit.html28
-rw-r--r--docs/reference/mkinmod.html2
-rw-r--r--docs/reference/mkinpredict.html4
-rw-r--r--docs/reference/mmkin.html4
-rw-r--r--docs/reference/summary.mkinfit.html4
-rw-r--r--tests/testthat/test_error_models.R13
-rw-r--r--tests/testthat/test_nafta.R8
-rw-r--r--vignettes/mkin_benchmarks.rdabin877 -> 875 bytes
19 files changed, 91 insertions, 81 deletions
diff --git a/DESCRIPTION b/DESCRIPTION
index eab410b5..7af9ef7e 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -2,7 +2,7 @@ Package: mkin
Type: Package
Title: Kinetic Evaluation of Chemical Degradation Data
Version: 0.9.49.5
-Date: 2019-07-03
+Date: 2019-07-04
Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"),
email = "jranke@uni-bremen.de",
comment = c(ORCID = "0000-0003-4371-6538")),
diff --git a/NEWS.md b/NEWS.md
index 37964fd9..853f6b56 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,4 +1,4 @@
-# mkin 0.9.49.5 (2019-07-03)
+# mkin 0.9.49.5 (2019-07-04)
- Several algorithms for minimization of the negative log-likelihood for non-constant error models (two-component and variance by variable). In the case the error model is constant variance, least squares is used as this is more stable. The default algorithm 'd_3' tries direct minimization and a three-step procedure, and returns the model with the highest likelihood.
@@ -14,7 +14,7 @@
- Add a simple benchmark vignette to document the impact on performance.
-- The code for manual weighting was removed. This functionality might get added again at a later time.
+- The code for manual weighting was removed. This functionality might get added again at a later time. For the time being, please use an earlier version, e.g. 0.9.48.1 if you want to do manual weighting.
- The fitting time reported in the summary now includes the time used for calculation of the hessians
@@ -22,6 +22,8 @@
- Fix an error in the FOCUS chi2 error level calculations that occurred if parameters were specified in parms.ini that were not in the model. A warning was already issued, but when fitting in parallel via mmkin this could go unnoticed.
+- Add example datasets obtained from risk assessment reports published by the European Food Safety Agency.
+
# mkin 0.9.48.1 (2019-03-04)
- Add the function 'logLik.mkinfit' which makes it possible to calculate an AIC for mkinfit objects
diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html
index 88a3fa6a..ed41e555 100644
--- a/docs/articles/FOCUS_D.html
+++ b/docs/articles/FOCUS_D.html
@@ -88,7 +88,7 @@
<h1>Example evaluation of FOCUS Example Dataset D</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-07-03</h4>
+ <h4 class="date">2019-07-04</h4>
<div class="hidden name"><code>FOCUS_D.Rmd</code></div>
@@ -168,8 +168,8 @@
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(fit)</a></code></pre></div>
<pre><code>## mkin version used for fitting: 0.9.49.5
## R version used for fitting: 3.6.0
-## Date of fit: Wed Jul 3 16:39:00 2019
-## Date of summary: Wed Jul 3 16:39:00 2019
+## Date of fit: Thu Jul 4 08:04:23 2019
+## Date of summary: Thu Jul 4 08:04:24 2019
##
## Equations:
## d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent
@@ -177,7 +177,7 @@
##
## Model predictions using solution type deSolve
##
-## Fitted using 389 model solutions performed in 0.977 s
+## Fitted using 389 model solutions performed in 0.982 s
##
## Error model: Constant variance
##
diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html
index 1b54252f..0060bd69 100644
--- a/docs/articles/FOCUS_L.html
+++ b/docs/articles/FOCUS_L.html
@@ -88,7 +88,7 @@
<h1>Example evaluation of FOCUS Laboratory Data L1 to L3</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-07-03</h4>
+ <h4 class="date">2019-07-04</h4>
<div class="hidden name"><code>FOCUS_L.Rmd</code></div>
@@ -114,15 +114,15 @@
<a class="sourceLine" id="cb2-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(m.L1.SFO)</a></code></pre></div>
<pre><code>## mkin version used for fitting: 0.9.49.5
## R version used for fitting: 3.6.0
-## Date of fit: Wed Jul 3 16:39:02 2019
-## Date of summary: Wed Jul 3 16:39:02 2019
+## Date of fit: Thu Jul 4 08:04:26 2019
+## Date of summary: Thu Jul 4 08:04:26 2019
##
## Equations:
## d_parent/dt = - k_parent_sink * parent
##
## Model predictions using solution type analytical
##
-## Fitted using 133 model solutions performed in 0.279 s
+## Fitted using 133 model solutions performed in 0.278 s
##
## Error model: Constant variance
##
@@ -216,8 +216,8 @@
## finite result is doubtful</code></pre>
<pre><code>## mkin version used for fitting: 0.9.49.5
## R version used for fitting: 3.6.0
-## Date of fit: Wed Jul 3 16:39:04 2019
-## Date of summary: Wed Jul 3 16:39:04 2019
+## Date of fit: Thu Jul 4 08:04:28 2019
+## Date of summary: Thu Jul 4 08:04:28 2019
##
##
## Warning: Optimisation did not converge:
@@ -229,7 +229,7 @@
##
## Model predictions using solution type analytical
##
-## Fitted using 899 model solutions performed in 1.874 s
+## Fitted using 899 model solutions performed in 1.876 s
##
## Error model: Constant variance
##
@@ -321,15 +321,15 @@
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(m.L2.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
<pre><code>## mkin version used for fitting: 0.9.49.5
## R version used for fitting: 3.6.0
-## Date of fit: Wed Jul 3 16:39:05 2019
-## Date of summary: Wed Jul 3 16:39:05 2019
+## Date of fit: Thu Jul 4 08:04:29 2019
+## Date of summary: Thu Jul 4 08:04:29 2019
##
## Equations:
## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
##
## Model predictions using solution type analytical
##
-## Fitted using 239 model solutions performed in 0.485 s
+## Fitted using 239 model solutions performed in 0.486 s
##
## Error model: Constant variance
##
@@ -397,8 +397,8 @@
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(m.L2.DFOP, <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
<pre><code>## mkin version used for fitting: 0.9.49.5
## R version used for fitting: 3.6.0
-## Date of fit: Wed Jul 3 16:39:07 2019
-## Date of summary: Wed Jul 3 16:39:07 2019
+## Date of fit: Thu Jul 4 08:04:30 2019
+## Date of summary: Thu Jul 4 08:04:30 2019
##
## Equations:
## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -497,8 +497,8 @@
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(mm.L3[[<span class="st">"DFOP"</span>, <span class="dv">1</span>]])</a></code></pre></div>
<pre><code>## mkin version used for fitting: 0.9.49.5
## R version used for fitting: 3.6.0
-## Date of fit: Wed Jul 3 16:39:08 2019
-## Date of summary: Wed Jul 3 16:39:09 2019
+## Date of fit: Thu Jul 4 08:04:32 2019
+## Date of summary: Thu Jul 4 08:04:32 2019
##
## Equations:
## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -507,7 +507,7 @@
##
## Model predictions using solution type analytical
##
-## Fitted using 373 model solutions performed in 0.772 s
+## Fitted using 373 model solutions performed in 0.773 s
##
## Error model: Constant variance
##
@@ -603,8 +603,8 @@
<div class="sourceCode" id="cb29"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb29-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(mm.L4[[<span class="st">"SFO"</span>, <span class="dv">1</span>]], <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
<pre><code>## mkin version used for fitting: 0.9.49.5
## R version used for fitting: 3.6.0
-## Date of fit: Wed Jul 3 16:39:09 2019
-## Date of summary: Wed Jul 3 16:39:10 2019
+## Date of fit: Thu Jul 4 08:04:33 2019
+## Date of summary: Thu Jul 4 08:04:33 2019
##
## Equations:
## d_parent/dt = - k_parent_sink * parent
@@ -668,15 +668,15 @@
<div class="sourceCode" id="cb31"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb31-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(mm.L4[[<span class="st">"FOMC"</span>, <span class="dv">1</span>]], <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
<pre><code>## mkin version used for fitting: 0.9.49.5
## R version used for fitting: 3.6.0
-## Date of fit: Wed Jul 3 16:39:10 2019
-## Date of summary: Wed Jul 3 16:39:10 2019
+## Date of fit: Thu Jul 4 08:04:33 2019
+## Date of summary: Thu Jul 4 08:04:33 2019
##
## Equations:
## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
##
## Model predictions using solution type analytical
##
-## Fitted using 224 model solutions performed in 0.452 s
+## Fitted using 224 model solutions performed in 0.453 s
##
## Error model: Constant variance
##
diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html
index df694259..8ad4a8e9 100644
--- a/docs/articles/mkin.html
+++ b/docs/articles/mkin.html
@@ -88,7 +88,7 @@
<h1>Introduction to mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-07-03</h4>
+ <h4 class="date">2019-07-04</h4>
<div class="hidden name"><code>mkin.Rmd</code></div>
diff --git a/docs/articles/twa.html b/docs/articles/twa.html
index 34b85796..98e5efdf 100644
--- a/docs/articles/twa.html
+++ b/docs/articles/twa.html
@@ -88,7 +88,7 @@
<h1>Calculation of time weighted average concentrations with mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-07-03</h4>
+ <h4 class="date">2019-07-04</h4>
<div class="hidden name"><code>twa.Rmd</code></div>
diff --git a/docs/articles/web_only/FOCUS_Z.html b/docs/articles/web_only/FOCUS_Z.html
index b82e1e01..4a856b71 100644
--- a/docs/articles/web_only/FOCUS_Z.html
+++ b/docs/articles/web_only/FOCUS_Z.html
@@ -88,7 +88,7 @@
<h1>Example evaluation of FOCUS dataset Z</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-07-03</h4>
+ <h4 class="date">2019-07-04</h4>
<div class="hidden name"><code>FOCUS_Z.Rmd</code></div>
diff --git a/docs/articles/web_only/NAFTA_examples.html b/docs/articles/web_only/NAFTA_examples.html
index c1922b64..3f6ff8b9 100644
--- a/docs/articles/web_only/NAFTA_examples.html
+++ b/docs/articles/web_only/NAFTA_examples.html
@@ -88,7 +88,7 @@
<h1>Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-07-03</h4>
+ <h4 class="date">2019-07-04</h4>
<div class="hidden name"><code>NAFTA_examples.Rmd</code></div>
diff --git a/docs/articles/web_only/benchmarks.html b/docs/articles/web_only/benchmarks.html
index c68db93b..005834cc 100644
--- a/docs/articles/web_only/benchmarks.html
+++ b/docs/articles/web_only/benchmarks.html
@@ -88,7 +88,7 @@
<h1>Benchmark timings for mkin on various systems</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-07-03</h4>
+ <h4 class="date">2019-07-04</h4>
<div class="hidden name"><code>benchmarks.Rmd</code></div>
@@ -202,77 +202,77 @@
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 7.064
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 7.296
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 5.936
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 5.820
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 5.843
## t2
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 11.019
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 22.889
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 12.558
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 21.239
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 20.545
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 35.917
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 35.863
## t3
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 3.764
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 4.649
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 4.786
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 4.510
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 4.446
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 4.415
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 4.417
## t4
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 14.347
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 13.789
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 8.461
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 13.805
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 15.335
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 30.588
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 30.484
## t5
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 9.495
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 6.395
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 5.675
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 7.386
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 6.002
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 10.317
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 10.307
## t6
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 2.623
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 2.542
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 2.723
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 2.643
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 2.635
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 2.556
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 2.538
## t7
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 4.587
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 4.128
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 4.478
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 4.374
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 4.259
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 4.213
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 4.196
## t8
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 7.525
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 4.632
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 4.862
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 7.02
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 4.737
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 7.851
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 7.853
## t9
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 16.621
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 8.171
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 7.618
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 11.124
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 7.763
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 15.645
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 15.643
## t10
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 8.576
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 3.676
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 3.579
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 5.388
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 3.427
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 7.734
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 7.733
## t11
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 31.267
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 5.636
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 5.574
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 7.365
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 5.626
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 10.489</code></pre>
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.5 10.511</code></pre>
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/save">save</a></span>(mkin_benchmarks, <span class="dt">file =</span> <span class="st">"~/git/mkin/vignettes/mkin_benchmarks.rda"</span>)</a></code></pre></div>
</div>
</div>
diff --git a/docs/articles/web_only/compiled_models.html b/docs/articles/web_only/compiled_models.html
index b30488a0..3fc54cfa 100644
--- a/docs/articles/web_only/compiled_models.html
+++ b/docs/articles/web_only/compiled_models.html
@@ -88,7 +88,7 @@
<h1>Performance benefit by using compiled model definitions in mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-07-03</h4>
+ <h4 class="date">2019-07-04</h4>
<div class="hidden name"><code>compiled_models.Rmd</code></div>
@@ -163,9 +163,9 @@
## Warning in mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "deSolve", quiet
## = TRUE): Observations with value of zero were removed from the data</code></pre>
<pre><code>## test replications elapsed relative user.self sys.self
-## 3 deSolve, compiled 3 3.043 1.000 3.042 0
-## 1 deSolve, not compiled 3 28.630 9.408 28.616 0
-## 2 Eigenvalue based 3 4.291 1.410 4.289 0
+## 3 deSolve, compiled 3 3.061 1.000 3.059 0
+## 1 deSolve, not compiled 3 28.502 9.311 28.487 0
+## 2 Eigenvalue based 3 4.321 1.412 4.318 0
## user.child sys.child
## 3 0 0
## 1 0 0
@@ -214,8 +214,8 @@
## Warning in mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE): Observations with
## value of zero were removed from the data</code></pre>
<pre><code>## test replications elapsed relative user.self sys.self
-## 2 deSolve, compiled 3 4.800 1.000 4.795 0.002
-## 1 deSolve, not compiled 3 53.371 11.119 53.346 0.000
+## 2 deSolve, compiled 3 4.818 1.000 4.814 0
+## 1 deSolve, not compiled 3 53.275 11.057 53.249 0
## user.child sys.child
## 2 0 0
## 1 0 0</code></pre>
diff --git a/docs/news/index.html b/docs/news/index.html
index f8504768..0b82cbcc 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -122,9 +122,9 @@
</div>
- <div id="mkin-0-9-49-5-2019-07-03" class="section level1">
+ <div id="mkin-0-9-49-5-2019-07-04" class="section level1">
<h1 class="page-header">
-<a href="#mkin-0-9-49-5-2019-07-03" class="anchor"></a>mkin 0.9.49.5 (2019-07-03)<small> Unreleased </small>
+<a href="#mkin-0-9-49-5-2019-07-04" class="anchor"></a>mkin 0.9.49.5 (2019-07-04)<small> Unreleased </small>
</h1>
<ul>
<li><p>Several algorithms for minimization of the negative log-likelihood for non-constant error models (two-component and variance by variable). In the case the error model is constant variance, least squares is used as this is more stable. The default algorithm ‘d_3’ tries direct minimization and a three-step procedure, and returns the model with the highest likelihood.</p></li>
@@ -134,10 +134,11 @@
<li><p>Remove dependency on FME, only use nlminb for optimisation (‘Port’ algorithm). I cannot remember cases where one of the other optimisation algorithms was preferable, except that I sometime used Levenberg-Marquardt for speed in cases where I did not expect to get trapped in a local minimum.</p></li>
<li><p>Use the numDeriv package to calculate hessians. This results in slightly different confidence intervals, takes a bit longer, but is apparently more robust</p></li>
<li><p>Add a simple benchmark vignette to document the impact on performance.</p></li>
-<li><p>The code for manual weighting was removed. This functionality might get added again at a later time.</p></li>
+<li><p>The code for manual weighting was removed. This functionality might get added again at a later time. For the time being, please use an earlier version, e.g. 0.9.48.1 if you want to do manual weighting.</p></li>
<li><p>The fitting time reported in the summary now includes the time used for calculation of the hessians</p></li>
<li><p>Adapt tests</p></li>
<li><p>Fix an error in the FOCUS chi2 error level calculations that occurred if parameters were specified in parms.ini that were not in the model. A warning was already issued, but when fitting in parallel via mmkin this could go unnoticed.</p></li>
+<li><p>Add example datasets obtained from risk assessment reports published by the European Food Safety Agency.</p></li>
</ul>
</div>
<div id="mkin-0-9-48-1-2019-03-04" class="section level1">
@@ -698,7 +699,7 @@
<div id="tocnav">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
- <li><a href="#mkin-0-9-49-5-2019-07-03">0.9.49.5</a></li>
+ <li><a href="#mkin-0-9-49-5-2019-07-04">0.9.49.5</a></li>
<li><a href="#mkin-0-9-48-1-2019-03-04">0.9.48.1</a></li>
<li><a href="#mkin-0-9-47-5-2018-09-14">0.9.47.5</a></li>
<li><a href="#mkin-0-9-47-3">0.9.47.3</a></li>
diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html
index 3e20fc5d..0983007e 100644
--- a/docs/reference/mkinfit.html
+++ b/docs/reference/mkinfit.html
@@ -399,15 +399,15 @@ Per default, parameters in the kinetic models are internally transformed in
<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.49.5
#&gt; R version used for fitting: 3.6.0
-#&gt; Date of fit: Wed Jul 3 16:36:58 2019
-#&gt; Date of summary: Wed Jul 3 16:36:58 2019
+#&gt; Date of fit: Thu Jul 4 08:02:21 2019
+#&gt; Date of summary: Thu Jul 4 08:02:21 2019
#&gt;
#&gt; Equations:
#&gt; d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
#&gt;
#&gt; Model predictions using solution type analytical
#&gt;
-#&gt; Fitted using 222 model solutions performed in 0.46 s
+#&gt; Fitted using 222 model solutions performed in 0.464 s
#&gt;
#&gt; Error model: Constant variance
#&gt;
@@ -481,7 +481,7 @@ Per default, parameters in the kinetic models are internally transformed in
<span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.time'>system.time</a></span>(<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>,
<span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)))</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#&gt; User System verstrichen
-#&gt; 1.497 0.000 1.499 </div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/coef'>coef</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; NULL</div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; $ff
+#&gt; 1.507 0.004 1.511 </div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/coef'>coef</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; NULL</div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; $ff
#&gt; parent_sink parent_m1 m1_sink
#&gt; 0.485524 0.514476 1.000000
#&gt;
@@ -553,7 +553,7 @@ Per default, parameters in the kinetic models are internally transformed in
#&gt; Sum of squared residuals at call 126: 371.2134
#&gt; Sum of squared residuals at call 135: 371.2134
#&gt; Negative log-likelihood at call 145: 97.22429</div><div class='output co'>#&gt; <span class='message'>Optimisation successfully terminated.</span></div><div class='output co'>#&gt; User System verstrichen
-#&gt; 1.079 0.000 1.079 </div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/coef'>coef</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#&gt; NULL</div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#&gt; $ff
+#&gt; 1.078 0.000 1.078 </div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/coef'>coef</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#&gt; NULL</div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#&gt; $ff
#&gt; parent_sink parent_m1 m1_sink
#&gt; 0.485524 0.514476 1.000000
#&gt;
@@ -585,8 +585,8 @@ Per default, parameters in the kinetic models are internally transformed in
<span class='no'>SFO_SFO.ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>),
<span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>f.noweight</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></span>(<span class='no'>f.noweight</span>)</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.49.5
#&gt; R version used for fitting: 3.6.0
-#&gt; Date of fit: Wed Jul 3 16:37:14 2019
-#&gt; Date of summary: Wed Jul 3 16:37:14 2019
+#&gt; Date of fit: Thu Jul 4 08:02:37 2019
+#&gt; Date of summary: Thu Jul 4 08:02:37 2019
#&gt;
#&gt; Equations:
#&gt; d_parent/dt = - k_parent * parent
@@ -594,7 +594,7 @@ Per default, parameters in the kinetic models are internally transformed in
#&gt;
#&gt; Model predictions using solution type deSolve
#&gt;
-#&gt; Fitted using 421 model solutions performed in 1.107 s
+#&gt; Fitted using 421 model solutions performed in 1.096 s
#&gt;
#&gt; Error model: Constant variance
#&gt;
@@ -704,8 +704,8 @@ Per default, parameters in the kinetic models are internally transformed in
#&gt; 120 m1 25.15 28.78984 -3.640e+00
#&gt; 120 m1 33.31 28.78984 4.520e+00</div><div class='input'><span class='no'>f.obs</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"obs"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></span>(<span class='no'>f.obs</span>)</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.49.5
#&gt; R version used for fitting: 3.6.0
-#&gt; Date of fit: Wed Jul 3 16:37:17 2019
-#&gt; Date of summary: Wed Jul 3 16:37:17 2019
+#&gt; Date of fit: Thu Jul 4 08:02:40 2019
+#&gt; Date of summary: Thu Jul 4 08:02:40 2019
#&gt;
#&gt; Equations:
#&gt; d_parent/dt = - k_parent * parent
@@ -713,7 +713,7 @@ Per default, parameters in the kinetic models are internally transformed in
#&gt;
#&gt; Model predictions using solution type deSolve
#&gt;
-#&gt; Fitted using 979 model solutions performed in 2.612 s
+#&gt; Fitted using 979 model solutions performed in 2.574 s
#&gt;
#&gt; Error model: Variance unique to each observed variable
#&gt;
@@ -836,8 +836,8 @@ Per default, parameters in the kinetic models are internally transformed in
#&gt; 120 m1 25.15 28.80429 -3.654e+00
#&gt; 120 m1 33.31 28.80429 4.506e+00</div><div class='input'><span class='no'>f.tc</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></span>(<span class='no'>f.tc</span>)</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.49.5
#&gt; R version used for fitting: 3.6.0
-#&gt; Date of fit: Wed Jul 3 16:37:26 2019
-#&gt; Date of summary: Wed Jul 3 16:37:26 2019
+#&gt; Date of fit: Thu Jul 4 08:02:49 2019
+#&gt; Date of summary: Thu Jul 4 08:02:49 2019
#&gt;
#&gt; Equations:
#&gt; d_parent/dt = - k_parent * parent
@@ -845,7 +845,7 @@ Per default, parameters in the kinetic models are internally transformed in
#&gt;
#&gt; Model predictions using solution type deSolve
#&gt;
-#&gt; Fitted using 2289 model solutions performed in 9.522 s
+#&gt; Fitted using 2289 model solutions performed in 9.379 s
#&gt;
#&gt; Error model: Two-component variance function
#&gt;
diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html
index f1793541..39fe631b 100644
--- a/docs/reference/mkinmod.html
+++ b/docs/reference/mkinmod.html
@@ -234,7 +234,7 @@ For the definition of model types and their parameters, the equations given
<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinmod</span>(
<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>),
<span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; Compilation argument:
-#&gt; /usr/lib/R/bin/R CMD SHLIB file24f24fd75f75.c 2&gt; file24f24fd75f75.c.err.txt
+#&gt; /usr/lib/R/bin/R CMD SHLIB file6e9c38dae9ed.c 2&gt; file6e9c38dae9ed.c.err.txt
#&gt; Program source:
#&gt; 1: #include &lt;R.h&gt;
#&gt; 2:
diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html
index 9c4263b6..ef847245 100644
--- a/docs/reference/mkinpredict.html
+++ b/docs/reference/mkinpredict.html
@@ -328,7 +328,7 @@
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/seq'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
<span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>)[<span class='fl'>201</span>,]))</div><div class='output co'>#&gt; time parent m1
#&gt; 201 20 4.978707 27.46227</div><div class='output co'>#&gt; User System verstrichen
-#&gt; 0.003 0.000 0.004 </div><div class='input'> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.time'>system.time</a></span>(
+#&gt; 0.004 0.000 0.003 </div><div class='input'> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.time'>system.time</a></span>(
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='kw'>k_parent_m1</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='kw'>k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>k_m1_sink</span> <span class='kw'>=</span> <span class='fl'>0.01</span>),
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/seq'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
<span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)[<span class='fl'>201</span>,]))</div><div class='output co'>#&gt; time parent m1
@@ -338,7 +338,7 @@
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/seq'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
<span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)[<span class='fl'>201</span>,]))</div><div class='output co'>#&gt; time parent m1
#&gt; 201 20 4.978707 27.46227</div><div class='output co'>#&gt; User System verstrichen
-#&gt; 0.022 0.000 0.022 </div><div class='input'>
+#&gt; 0.022 0.000 0.021 </div><div class='input'>
</div><div class='input'> <span class='co'># Predict from a fitted model</span>
<span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_C</span>)</div><div class='output co'>#&gt; <span class='message'>Ordinary least squares optimisation</span></div><div class='output co'>#&gt; Sum of squared residuals at call 1: 552.5739
#&gt; Sum of squared residuals at call 3: 552.5739
diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html
index 7a34ac7d..38c46b6e 100644
--- a/docs/reference/mmkin.html
+++ b/docs/reference/mmkin.html
@@ -194,8 +194,8 @@
<span class='no'>time_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.time'>system.time</a></span>(<span class='no'>fits.4</span> <span class='kw'>&lt;-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))
<span class='no'>time_default</span></div><div class='output co'>#&gt; User System verstrichen
-#&gt; 0.036 0.048 5.130 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#&gt; User System verstrichen
-#&gt; 19.222 0.000 19.233 </div><div class='input'>
+#&gt; 0.055 0.032 5.069 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#&gt; User System verstrichen
+#&gt; 19.260 0.000 19.271 </div><div class='input'>
<span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='st'>"SFO_lin"</span>, <span class='fl'>2</span>]])</div><div class='output co'>#&gt; $ff
#&gt; parent_M1 parent_sink M1_M2 M1_sink
#&gt; 0.7340481 0.2659519 0.7505684 0.2494316
diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html
index 4f2c9ecb..c4d2653d 100644
--- a/docs/reference/summary.mkinfit.html
+++ b/docs/reference/summary.mkinfit.html
@@ -211,8 +211,8 @@
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></span>(<span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)), <span class='no'>FOCUS_2006_A</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.49.5
#&gt; R version used for fitting: 3.6.0
-#&gt; Date of fit: Wed Jul 3 16:38:45 2019
-#&gt; Date of summary: Wed Jul 3 16:38:45 2019
+#&gt; Date of fit: Thu Jul 4 08:04:08 2019
+#&gt; Date of summary: Thu Jul 4 08:04:08 2019
#&gt;
#&gt; Equations:
#&gt; d_parent/dt = - k_parent_sink * parent
diff --git a/tests/testthat/test_error_models.R b/tests/testthat/test_error_models.R
index 33e44bf8..fbae6286 100644
--- a/tests/testthat/test_error_models.R
+++ b/tests/testthat/test_error_models.R
@@ -91,14 +91,17 @@ test_that("Reweighting method 'tc' produces reasonable variance estimates", {
sdfunc = function(x) sigma_twocomp(x, 0.5, 0.07),
n = 1, reps = 100, digits = 5, LOD = -Inf, seed = 123456)
- # Per default (on my box) use all cores minus one
- n_cores <- parallel::detectCores() - 1
+ # Per default (on my box where I set NOT_CRAN) use all cores minus one
+ if (identical(Sys.getenv("NOT_CRAN"), "true")) {
+ n_cores <- parallel::detectCores() - 1
+ } else {
+ n_cores <- 1
+ }
- # We are only allowed one core on travis
+ # We are only allowed one core on travis, but they also set NOT_CRAN=true
if (Sys.getenv("TRAVIS") != "") n_cores = 1
- # Also on Windows we would need to make a cluster first,
- # and I do not know how this would work on winbuilder or CRAN, so
+ # On Windows we would need to make a cluster first
if (Sys.info()["sysname"] == "Windows") n_cores = 1
# Unweighted fits
diff --git a/tests/testthat/test_nafta.R b/tests/testthat/test_nafta.R
index 096287aa..8cb1895b 100644
--- a/tests/testthat/test_nafta.R
+++ b/tests/testthat/test_nafta.R
@@ -39,7 +39,9 @@ test_that("Test data from Appendix B are correctly evaluated", {
expect_known_output(print(res), "NAFTA_SOP_Appendix_B.txt")
plot_nafta <- function() plot(res)
- vdiffr::expect_doppelganger("NAFTA SOP Appendix B", plot_nafta)
+ if(requireNamespace("vdiffr", quietly = TRUE)) {
+ vdiffr::expect_doppelganger("NAFTA SOP Appendix B", plot_nafta)
+ }
})
test_that("Test data from Appendix D are correctly evaluated", {
@@ -61,5 +63,7 @@ test_that("Test data from Appendix D are correctly evaluated", {
expect_known_output(print(res), "NAFTA_SOP_Appendix_D.txt")
plot_nafta <- function() plot(res)
- vdiffr::expect_doppelganger("Plot NAFTA analysis", plot_nafta)
+ if(requireNamespace("vdiffr", quietly = TRUE)) {
+ vdiffr::expect_doppelganger("Plot NAFTA analysis", plot_nafta)
+ }
})
diff --git a/vignettes/mkin_benchmarks.rda b/vignettes/mkin_benchmarks.rda
index 4828db0d..521ccb7d 100644
--- a/vignettes/mkin_benchmarks.rda
+++ b/vignettes/mkin_benchmarks.rda
Binary files differ

Contact - Imprint