From a4ca3451f1b5c37d10c6a41cb18a99b1631e8aa2 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 2 May 2019 17:07:55 +0200 Subject: Prepare for CRAN release - Skip long running tests on CRAN as well to avoid timeout on winbuilder - Don't install benchmark results in the package, they are only needed in the git repository - Don't run example in man/add_err.Rd as it takes > 10 s on winbuilder - Rebuild docs --- .Rbuildignore | 1 + build.log | 4 +- docs/articles/FOCUS_D.html | 6 +-- docs/articles/FOCUS_L.html | 42 +++++++++---------- docs/articles/web_only/benchmarks.html | 26 ++++++------ docs/articles/web_only/compiled_models.html | 10 ++--- docs/reference/add_err.html | 6 +-- docs/reference/mkinfit.html | 26 ++++++------ docs/reference/mkinmod.html | 2 +- docs/reference/mkinpredict.html | 2 +- docs/reference/mmkin.html | 4 +- docs/reference/summary.mkinfit.html | 4 +- inst/benchmark_data/mkin_benchmarks.rda | Bin 797 -> 0 bytes man/add_err.Rd | 3 +- tests/testthat/test_error_models.R | 1 + vignettes/mkin_benchmarks.rda | Bin 0 -> 801 bytes vignettes/web_only/benchmarks.Rmd | 4 +- vignettes/web_only/benchmarks.html | 60 +++++++++++++++------------- vignettes/web_only/mkin_benchmarks.rda | Bin 0 -> 797 bytes 19 files changed, 103 insertions(+), 98 deletions(-) delete mode 100644 inst/benchmark_data/mkin_benchmarks.rda create mode 100644 vignettes/mkin_benchmarks.rda create mode 100644 vignettes/web_only/mkin_benchmarks.rda diff --git a/.Rbuildignore b/.Rbuildignore index 934dc188..822bafab 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -22,6 +22,7 @@ ^vignettes/figure ^vignettes/FOCUS_Z.tex$ ^vignettes/mkin.tex$ +^vignettes/web_only/mkin_benchmarks.rda$ ^mkin_.*\.tar\.gz ^mkin.tar$ ^docs$ diff --git a/build.log b/build.log index 7a0899cc..9728241a 100644 --- a/build.log +++ b/build.log @@ -6,7 +6,5 @@ * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories * looking to see if a ‘data/datalist’ file should be added - NB: this package now depends on R (>= 3.5.0) - WARNING: Added dependency on R >= 3.5.0 because serialized objects in serialize/load version 3 cannot be read in older versions of R. File(s) containing such objects: 'mkin/inst/benchmark_data/mkin_benchmarks.rda' -* building 'mkin_0.9.49.4.tar.gz' +* building ‘mkin_0.9.49.4.tar.gz’ diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index 0ae6a391..4b82dd03 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -168,8 +168,8 @@
summary(fit)
## mkin version used for fitting:    0.9.49.4 
 ## R version used for fitting:       3.6.0 
-## Date of fit:     Thu May  2 12:40:29 2019 
-## Date of summary: Thu May  2 12:40:29 2019 
+## Date of fit:     Thu May  2 17:42:41 2019 
+## Date of summary: Thu May  2 17:42:41 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 396 model solutions performed in 1.048 s
+## Fitted using 396 model solutions performed in 1.055 s
 ## 
 ## Error model:
 ## Constant variance 
diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html
index b05963ae..05980b97 100644
--- a/docs/articles/FOCUS_L.html
+++ b/docs/articles/FOCUS_L.html
@@ -114,15 +114,15 @@
 summary(m.L1.SFO)
## mkin version used for fitting:    0.9.49.4 
 ## R version used for fitting:       3.6.0 
-## Date of fit:     Thu May  2 12:40:31 2019 
-## Date of summary: Thu May  2 12:40:31 2019 
+## Date of fit:     Thu May  2 17:42:43 2019 
+## Date of summary: Thu May  2 17:42:43 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 133 model solutions performed in 0.289 s
+## Fitted using 133 model solutions performed in 0.286 s
 ## 
 ## Error model:
 ## Constant variance 
@@ -215,8 +215,8 @@
 ## finite result is doubtful
## mkin version used for fitting:    0.9.49.4 
 ## R version used for fitting:       3.6.0 
-## Date of fit:     Thu May  2 12:40:33 2019 
-## Date of summary: Thu May  2 12:40:33 2019 
+## Date of fit:     Thu May  2 17:42:45 2019 
+## Date of summary: Thu May  2 17:42:45 2019 
 ## 
 ## 
 ## Warning: Optimisation did not converge:
@@ -228,7 +228,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 599 model solutions performed in 1.277 s
+## Fitted using 599 model solutions performed in 1.253 s
 ## 
 ## Error model:
 ## Constant variance 
@@ -319,15 +319,15 @@
 
summary(m.L2.FOMC, data = FALSE)
## mkin version used for fitting:    0.9.49.4 
 ## R version used for fitting:       3.6.0 
-## Date of fit:     Thu May  2 12:40:34 2019 
-## Date of summary: Thu May  2 12:40:34 2019 
+## Date of fit:     Thu May  2 17:42:46 2019 
+## Date of summary: Thu May  2 17:42:46 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 240 model solutions performed in 0.506 s
+## Fitted using 240 model solutions performed in 0.485 s
 ## 
 ## Error model:
 ## Constant variance 
@@ -394,8 +394,8 @@
 
summary(m.L2.DFOP, data = FALSE)
## mkin version used for fitting:    0.9.49.4 
 ## R version used for fitting:       3.6.0 
-## Date of fit:     Thu May  2 12:40:35 2019 
-## Date of summary: Thu May  2 12:40:35 2019 
+## Date of fit:     Thu May  2 17:42:47 2019 
+## Date of summary: Thu May  2 17:42:47 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -404,7 +404,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 587 model solutions performed in 1.273 s
+## Fitted using 587 model solutions performed in 1.22 s
 ## 
 ## Error model:
 ## Constant variance 
@@ -493,8 +493,8 @@
 
summary(mm.L3[["DFOP", 1]])
## mkin version used for fitting:    0.9.49.4 
 ## R version used for fitting:       3.6.0 
-## Date of fit:     Thu May  2 12:40:37 2019 
-## Date of summary: Thu May  2 12:40:37 2019 
+## Date of fit:     Thu May  2 17:42:49 2019 
+## Date of summary: Thu May  2 17:42:49 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -503,7 +503,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 372 model solutions performed in 0.777 s
+## Fitted using 372 model solutions performed in 0.769 s
 ## 
 ## Error model:
 ## Constant variance 
@@ -598,15 +598,15 @@
 
summary(mm.L4[["SFO", 1]], data = FALSE)
## mkin version used for fitting:    0.9.49.4 
 ## R version used for fitting:       3.6.0 
-## Date of fit:     Thu May  2 12:40:38 2019 
-## Date of summary: Thu May  2 12:40:38 2019 
+## Date of fit:     Thu May  2 17:42:50 2019 
+## Date of summary: Thu May  2 17:42:50 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 146 model solutions performed in 0.298 s
+## Fitted using 146 model solutions performed in 0.293 s
 ## 
 ## Error model:
 ## Constant variance 
@@ -662,15 +662,15 @@
 
summary(mm.L4[["FOMC", 1]], data = FALSE)
## mkin version used for fitting:    0.9.49.4 
 ## R version used for fitting:       3.6.0 
-## Date of fit:     Thu May  2 12:40:38 2019 
-## Date of summary: Thu May  2 12:40:38 2019 
+## Date of fit:     Thu May  2 17:42:50 2019 
+## Date of summary: Thu May  2 17:42:50 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.458 s
+## Fitted using 224 model solutions performed in 0.453 s
 ## 
 ## Error model:
 ## Constant variance 
diff --git a/docs/articles/web_only/benchmarks.html b/docs/articles/web_only/benchmarks.html
index 2cafe5c9..0653517a 100644
--- a/docs/articles/web_only/benchmarks.html
+++ b/docs/articles/web_only/benchmarks.html
@@ -105,7 +105,7 @@
 operating_system <- Sys.info()[["sysname"]]
 mkin_version <- as.character(packageVersion("mkin"))
 system_string <- paste0(operating_system, ", ", cpu_model, ", mkin version ", mkin_version)
-load("~/git/mkin/inst/benchmark_data/mkin_benchmarks.rda")
+load("~/git/mkin/vignettes/web_only/mkin_benchmarks.rda")
 mkin_benchmarks[system_string, c("CPU", "OS", "mkin")] <- c(cpu_model, operating_system, mkin_version)
 
 if (mkin_version > "0.9.48.1") {
@@ -198,68 +198,68 @@
 ## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 8.184
 ## 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.4 5.853
 ##                                                                         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.4 19.968
 ##                                                                        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.4 4.320
 ##                                                                         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.4 14.542
 ##                                                                        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.4 5.786
 ##                                                                        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.4 2.524
 ##                                                                        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.4 4.224
 ##                                                                        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.4 4.696
 ##                                                                         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.4  7.776
 ##                                                                       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.4 3.432
 ##                                                                        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
-
save(mkin_benchmarks, file = "~/git/mkin/inst/benchmark_data/mkin_benchmarks.rda")
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 5.599
+
save(mkin_benchmarks, file = "~/git/mkin/vignettes/mkin_benchmarks.rda")
diff --git a/docs/articles/web_only/compiled_models.html b/docs/articles/web_only/compiled_models.html index ee279f51..3174a067 100644 --- a/docs/articles/web_only/compiled_models.html +++ b/docs/articles/web_only/compiled_models.html @@ -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
##                    test replications elapsed relative user.self sys.self
-## 3     deSolve, compiled            3   3.178    1.000     3.176        0
-## 1 deSolve, not compiled            3  28.700    9.031    28.685        0
-## 2      Eigenvalue based            3   4.401    1.385     4.398        0
+## 3     deSolve, compiled            3   3.199    1.000     3.198        0
+## 1 deSolve, not compiled            3  28.591    8.937    28.578        0
+## 2      Eigenvalue based            3   4.405    1.377     4.403        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
##                    test replications elapsed relative user.self sys.self
-## 2     deSolve, compiled            3   4.549    1.000     4.547        0
-## 1 deSolve, not compiled            3  49.752   10.937    49.729        0
+## 2     deSolve, compiled            3   4.553    1.000     4.551        0
+## 1 deSolve, not compiled            3  49.844   10.948    49.822        0
 ##   user.child sys.child
 ## 2          0         0
 ## 1          0         0
diff --git a/docs/reference/add_err.html b/docs/reference/add_err.html index 2eee6131..63aa358c 100644 --- a/docs/reference/add_err.html +++ b/docs/reference/add_err.html @@ -217,8 +217,7 @@ # Name the model in the list of models (with only one member in this case) for # nicer plotting later on. Be quiet and use only one core not to offend CRAN -# checks -f_SFO_SFO <- mmkin(list("SFO-SFO" = m_SFO_SFO), +# checks
f_SFO_SFO <- mmkin(list("SFO-SFO" = m_SFO_SFO), d_SFO_SFO_err, cores = 1, quiet = TRUE) @@ -229,8 +228,7 @@ plot(f_SFO_SFO[[3]], show_residuals = TRUE)
# If we use single brackets, we should give two indices (model and dataset), # and plot.mmkin is used -plot(f_SFO_SFO[1, 3])
-
+plot(f_SFO_SFO[1, 3])
#> mkin version used for fitting: 0.9.49.4 #> R version used for fitting: 3.6.0 -#> Date of fit: Thu May 2 12:38:56 2019 -#> Date of summary: Thu May 2 12:38:56 2019 +#> Date of fit: Thu May 2 17:41:11 2019 +#> Date of summary: Thu May 2 17:41:11 2019 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent @@ -443,7 +443,7 @@ Per default, parameters in the kinetic models are internally transformed in m1 = mkinsub("SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
# Fit the model to the FOCUS example dataset D using defaults print(system.time(fit <- mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "eigen", quiet = TRUE)))
#> Warning: Observations with value of zero were removed from the data
#> User System verstrichen -#> 1.551 0.000 1.552
coef(fit)
#> NULL
#> $ff +#> 1.54 0.00 1.54
coef(fit)
#> NULL
#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 #> @@ -520,7 +520,7 @@ Per default, parameters in the kinetic models are internally transformed in #> Negative log-likelihood at call 152: 97.22429 #> Optimisation successfully terminated. #> User System verstrichen -#> 1.152 0.000 1.153
coef(fit.deSolve)
#> NULL
endpoints(fit.deSolve)
#> $ff +#> 1.1 0.0 1.1
coef(fit.deSolve)
#> NULL
endpoints(fit.deSolve)
#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 #> @@ -552,8 +552,8 @@ Per default, parameters in the kinetic models are internally transformed in SFO_SFO.ff <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"), use_of_ff = "max")
#> Successfully compiled differential equation model from auto-generated C code.
f.noweight <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
summary(f.noweight)
#> mkin version used for fitting: 0.9.49.4 #> R version used for fitting: 3.6.0 -#> Date of fit: Thu May 2 12:39:13 2019 -#> Date of summary: Thu May 2 12:39:13 2019 +#> Date of fit: Thu May 2 17:41:27 2019 +#> Date of summary: Thu May 2 17:41:27 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -561,7 +561,7 @@ Per default, parameters in the kinetic models are internally transformed in #> #> Model predictions using solution type deSolve #> -#> Fitted using 404 model solutions performed in 1.178 s +#> Fitted using 404 model solutions performed in 1.067 s #> #> Error model: #> Constant variance @@ -670,8 +670,8 @@ Per default, parameters in the kinetic models are internally transformed in #> 120 m1 25.15 28.78984 -3.640e+00 #> 120 m1 33.31 28.78984 4.520e+00
f.obs <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "obs", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
summary(f.obs)
#> mkin version used for fitting: 0.9.49.4 #> R version used for fitting: 3.6.0 -#> Date of fit: Thu May 2 12:39:14 2019 -#> Date of summary: Thu May 2 12:39:14 2019 +#> Date of fit: Thu May 2 17:41:28 2019 +#> Date of summary: Thu May 2 17:41:28 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -679,7 +679,7 @@ Per default, parameters in the kinetic models are internally transformed in #> #> Model predictions using solution type deSolve #> -#> Fitted using 558 model solutions performed in 1.518 s +#> Fitted using 558 model solutions performed in 1.447 s #> #> Error model: #> Variance unique to each observed variable @@ -800,8 +800,8 @@ Per default, parameters in the kinetic models are internally transformed in #> 120 m1 25.15 28.80430 -3.654e+00 #> 120 m1 33.31 28.80430 4.506e+00
f.tc <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "tc", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
summary(f.tc)
#> mkin version used for fitting: 0.9.49.4 #> R version used for fitting: 3.6.0 -#> Date of fit: Thu May 2 12:39:18 2019 -#> Date of summary: Thu May 2 12:39:18 2019 +#> Date of fit: Thu May 2 17:41:32 2019 +#> Date of summary: Thu May 2 17:41:32 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -809,7 +809,7 @@ Per default, parameters in the kinetic models are internally transformed in #> #> Model predictions using solution type deSolve #> -#> Fitted using 844 model solutions performed in 3.501 s +#> Fitted using 844 model solutions performed in 3.407 s #> #> Error model: #> Two-component variance function diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index b545dad1..0b96c6cb 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 SFO_SFO <- mkinmod( parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"), verbose = TRUE)
#> Compilation argument: -#> /usr/lib/R/bin/R CMD SHLIB file35fe67db2b2a.c 2> file35fe67db2b2a.c.err.txt +#> /usr/lib/R/bin/R CMD SHLIB file7e6c2d3bf9bc.c 2> file7e6c2d3bf9bc.c.err.txt #> Program source: #> 1: #include <R.h> #> 2: diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index 4b75603f..e3e17e78 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -333,7 +333,7 @@ c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "deSolve")[201,]))
#> time parent m1 #> 201 20 4.978707 27.46227
#> User System verstrichen -#> 0.002 0.000 0.001
system.time( +#> 0.002 0.000 0.002
system.time( print(mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "deSolve", use_compiled = FALSE)[201,]))
#> time parent m1 diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index a16cb6d7..d61c0565 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -194,8 +194,8 @@ time_1 <- system.time(fits.4 <- mmkin(models, datasets, cores = 1, quiet = TRUE)) time_default
#> User System verstrichen -#> 0.040 0.035 7.515
time_1
#> User System verstrichen -#> 21.597 0.000 21.609
+#> 0.044 0.026 7.470
time_1
#> User System verstrichen +#> 21.144 0.004 21.161
endpoints(fits.0[["SFO_lin", 2]])
#> $ff #> parent_M1 parent_sink M1_M2 M1_sink #> 0.7340481 0.2659519 0.7505683 0.2494317 diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index 1a08132f..7e767ab3 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -211,8 +211,8 @@

Examples

summary(mkinfit(mkinmod(parent = mkinsub("SFO")), FOCUS_2006_A, quiet = TRUE))
#> mkin version used for fitting: 0.9.49.4 #> R version used for fitting: 3.6.0 -#> Date of fit: Thu May 2 12:40:14 2019 -#> Date of summary: Thu May 2 12:40:14 2019 +#> Date of fit: Thu May 2 17:42:27 2019 +#> Date of summary: Thu May 2 17:42:27 2019 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent diff --git a/inst/benchmark_data/mkin_benchmarks.rda b/inst/benchmark_data/mkin_benchmarks.rda deleted file mode 100644 index 388a7886..00000000 Binary files a/inst/benchmark_data/mkin_benchmarks.rda and /dev/null differ diff --git a/man/add_err.Rd b/man/add_err.Rd index 506c6fdc..00b50878 100644 --- a/man/add_err.Rd +++ b/man/add_err.Rd @@ -81,6 +81,7 @@ names(d_SFO_SFO_err) <- paste("Dataset", 1:3) # Name the model in the list of models (with only one member in this case) for # nicer plotting later on. Be quiet and use only one core not to offend CRAN # checks +\dontrun{ f_SFO_SFO <- mmkin(list("SFO-SFO" = m_SFO_SFO), d_SFO_SFO_err, cores = 1, quiet = TRUE) @@ -95,6 +96,6 @@ plot(f_SFO_SFO[[3]], show_residuals = TRUE) # If we use single brackets, we should give two indices (model and dataset), # and plot.mmkin is used plot(f_SFO_SFO[1, 3]) - +} } \keyword{ manip } diff --git a/tests/testthat/test_error_models.R b/tests/testthat/test_error_models.R index 1ec48605..d7a5cea8 100644 --- a/tests/testthat/test_error_models.R +++ b/tests/testthat/test_error_models.R @@ -159,6 +159,7 @@ test_that("Reweighting method 'tc' produces reasonable variance estimates", { # Doing more takes a lot of computing power skip_on_travis() + skip_on_cran() f_met_2_15_tc_e4 <- mmkin(list(m_synth_DFOP_lin), d_met_2_15, quiet = TRUE, error_model = "tc", cores = n_cores) diff --git a/vignettes/mkin_benchmarks.rda b/vignettes/mkin_benchmarks.rda new file mode 100644 index 00000000..cb16a6d3 Binary files /dev/null and b/vignettes/mkin_benchmarks.rda differ diff --git a/vignettes/web_only/benchmarks.Rmd b/vignettes/web_only/benchmarks.Rmd index 83381717..4849635f 100644 --- a/vignettes/web_only/benchmarks.Rmd +++ b/vignettes/web_only/benchmarks.Rmd @@ -29,7 +29,7 @@ cpu_model <- benchmarkme::get_cpu()$model_name operating_system <- Sys.info()[["sysname"]] mkin_version <- as.character(packageVersion("mkin")) system_string <- paste0(operating_system, ", ", cpu_model, ", mkin version ", mkin_version) -load("~/git/mkin/inst/benchmark_data/mkin_benchmarks.rda") +load("~/git/mkin/vignettes/web_only/mkin_benchmarks.rda") mkin_benchmarks[system_string, c("CPU", "OS", "mkin")] <- c(cpu_model, operating_system, mkin_version) if (mkin_version > "0.9.48.1") { @@ -86,5 +86,5 @@ mkin_benchmarks[system_string, paste0("t", 1:11)] <- c(t1, t2, t3, t4, t5, t6, t mkin_benchmarks -save(mkin_benchmarks, file = "~/git/mkin/inst/benchmark_data/mkin_benchmarks.rda") +save(mkin_benchmarks, file = "~/git/mkin/vignettes/mkin_benchmarks.rda") ``` diff --git a/vignettes/web_only/benchmarks.html b/vignettes/web_only/benchmarks.html index b35a9695..054b4afc 100644 --- a/vignettes/web_only/benchmarks.html +++ b/vignettes/web_only/benchmarks.html @@ -11,7 +11,7 @@ - + Benchmark timings for mkin on various systems @@ -1280,7 +1280,7 @@ window.initializeCodeFolding = function(show) { var currentIndex = 1; // select all R code blocks - var rCodeBlocks = $('pre.r, pre.python, pre.bash, pre.sql, pre.cpp, pre.stan'); + var rCodeBlocks = $('pre.r, pre.python, pre.bash, pre.sql, pre.cpp, pre.stan, pre.julia'); rCodeBlocks.each(function() { // create a collapsable div to wrap the code in @@ -1387,9 +1387,7 @@ h6 { - - + + + + + + + +
+ +
@@ -1613,8 +1619,8 @@ div.tocify {

Benchmark timings for mkin on various systems

-

Johannes Ranke

-

2019-04-09

+

Johannes Ranke

+

2019-05-02

@@ -1626,7 +1632,7 @@ div.tocify { operating_system <- Sys.info()[["sysname"]] mkin_version <- as.character(packageVersion("mkin")) system_string <- paste0(operating_system, ", ", cpu_model, ", mkin version ", mkin_version) -load("~/git/mkin/inst/benchmark_data/mkin_benchmarks.rda") +load("~/git/mkin/vignettes/web_only/mkin_benchmarks.rda") mkin_benchmarks[system_string, c("CPU", "OS", "mkin")] <- c(cpu_model, operating_system, mkin_version) if (mkin_version > "0.9.48.1") { @@ -1636,9 +1642,10 @@ if (mkin_version > "0.9.48.1") { }
# Parent only
 t1 <- system.time(mmkin_bench(c("SFO", "FOMC", "DFOP", "HS"), list(FOCUS_2006_C, FOCUS_2006_D)))[["elapsed"]]
-t2 <- system.time(mmkin_bench(c("SFO", "FOMC", "DFOP", "HS"), list(FOCUS_2006_C, FOCUS_2006_D), error_model = "tc"))[["elapsed"]]
-
-# One metabolite
+t2 <- system.time(mmkin_bench(c("SFO", "FOMC", "DFOP", "HS"), list(FOCUS_2006_C, FOCUS_2006_D), error_model = "tc"))[["elapsed"]]
+
## Warning in mkinfit(models[[model_index]], datasets[[dataset_index]], ...): Optimisation did not converge:
+## false convergence (8)
+
# One metabolite
 SFO_SFO <- mkinmod(
   parent = mkinsub("SFO", "m1"),
   m1 = mkinsub("SFO"))
@@ -1653,9 +1660,8 @@ SFO_SFO <- mkinmod(
## Successfully compiled differential equation model from auto-generated C code.
t3 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_2006_D)))[["elapsed"]]
## Warning in mkinfit(models[[model_index]], datasets[[dataset_index]], ...):
-## Observations with value of zero were removed from the data
-
-## Warning in mkinfit(models[[model_index]], datasets[[dataset_index]], ...):
+## Observations with value of zero were removed from the data
+
## Warning in mkinfit(models[[model_index]], datasets[[dataset_index]], ...):
 ## Observations with value of zero were removed from the data
 
 ## Warning in mkinfit(models[[model_index]], datasets[[dataset_index]], ...):
@@ -1719,68 +1725,68 @@ mkin_benchmarks
## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 8.184 ## 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 6.712 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 6.023 ## 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 23.082 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 20.409 ## 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 3.595 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 4.283 ## 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 11.975 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 14.531 ## 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 4.881 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 5.744 ## 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 1.981 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 2.518 ## 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 3.32 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 4.211 ## 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 3.309 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 4.557 ## 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 6.075 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 7.739 ## 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 2.518 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 3.413 ## 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 4.289
-
save(mkin_benchmarks, file = "~/git/mkin/inst/benchmark_data/mkin_benchmarks.rda")
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 5.588 +
save(mkin_benchmarks, file = "~/git/mkin/vignettes/mkin_benchmarks.rda")
diff --git a/vignettes/web_only/mkin_benchmarks.rda b/vignettes/web_only/mkin_benchmarks.rda new file mode 100644 index 00000000..388a7886 Binary files /dev/null and b/vignettes/web_only/mkin_benchmarks.rda differ -- cgit v1.2.1