From f9e0c46378f090a04fe95c70bb7977a686679895 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 31 Mar 2020 09:24:14 +0200 Subject: Static documentation rebuilt by pkgdown --- DESCRIPTION | 4 +- NAMESPACE | 1 + R/mkinmod.R | 6 ++- check.log | 15 +++++-- test.log | 51 ++++++++++++++-------- .../plotting/plot-errmod-with-sfo-lin-a-obs.svg | 6 +-- tests/testthat/DFOP_FOCUS_C_messages.txt | 4 +- tests/testthat/FOCUS_2006_D.csf | 2 +- 8 files changed, 57 insertions(+), 32 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f631a541..5576e5bf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: mkin Type: Package Title: Kinetic Evaluation of Chemical Degradation Data Version: 0.9.49.9 -Date: 2020-03-20 +Date: 2020-03-31 Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "jranke@uni-bremen.de", comment = c(ORCID = "0000-0003-4371-6538")), @@ -17,7 +17,7 @@ Description: Calculation routines based on the FOCUS Kinetics Report (2006, note that no warranty is implied for correctness of results or fitness for a particular purpose. Imports: stats, graphics, methods, deSolve, R6, inline, parallel, numDeriv, - lmtest + lmtest, pkgbuild Suggests: knitr, rbenchmark, tikzDevice, testthat, rmarkdown, covr, vdiffr, benchmarkme, tibble, stats4 License: GPL diff --git a/NAMESPACE b/NAMESPACE index 26995055..6f509cd7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -76,6 +76,7 @@ importFrom(methods,signature) importFrom(parallel,detectCores) importFrom(parallel,mclapply) importFrom(parallel,parLapply) +importFrom(pkgbuild,has_compiler) importFrom(stats,AIC) importFrom(stats,BIC) importFrom(stats,aggregate) diff --git a/R/mkinmod.R b/R/mkinmod.R index cf618525..cfd40504 100644 --- a/R/mkinmod.R +++ b/R/mkinmod.R @@ -33,6 +33,7 @@ #' @param verbose If \code{TRUE}, passed to \code{\link{cfunction}} if #' applicable to give detailed information about the C function being built. #' @importFrom methods signature +#' @importFrom pkgbuild has_compiler #' @importFrom inline cfunction #' @return A list of class \code{mkinmod} for use with \code{\link{mkinfit}}, #' containing, among others, @@ -364,8 +365,9 @@ mkinmod <- function(..., use_of_ff = "min", speclist = NULL, quiet = FALSE, verb model$coefmat <- m }#}}} - # Try to create a function compiled from C code if >1 observed variable {{{ - if (length(obs_vars) > 1) { + # Try to create a function compiled from C code there is more than one observed variable {{{ + # and a compiler is available + if (length(obs_vars) > 1 & has_compiler()) { # Translate the R code for the derivatives to C code diffs.C <- paste(diffs, collapse = ";\n") diff --git a/check.log b/check.log index b7555c55..35ab651a 100644 --- a/check.log +++ b/check.log @@ -1,11 +1,11 @@ * using log directory ‘/home/jranke/git/mkin/mkin.Rcheck’ -* using R version 3.6.2 (2019-12-12) +* using R version 3.6.3 (2020-02-29) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using options ‘--no-tests --as-cran’ * checking for file ‘mkin/DESCRIPTION’ ... OK * checking extension type ... Package -* this is package ‘mkin’ version ‘0.9.49.8’ +* this is package ‘mkin’ version ‘0.9.49.9’ * package encoding: UTF-8 * checking CRAN incoming feasibility ... Note_to_CRAN_maintainers Maintainer: ‘Johannes Ranke ’ @@ -56,7 +56,10 @@ Maintainer: ‘Johannes Ranke ’ * checking data for ASCII and uncompressed saves ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK -* checking examples ... OK +* checking examples ... NOTE +Examples with CPU or elapsed time > 5s + user system elapsed +mkinsub 2.015 4.083 0.703 * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... SKIPPED * checking for unstated dependencies in vignettes ... OK @@ -66,5 +69,9 @@ Maintainer: ‘Johannes Ranke ’ * checking for detritus in the temp directory ... OK * DONE -Status: OK +Status: 1 NOTE +See + ‘/home/jranke/git/mkin/mkin.Rcheck/00check.log’ +for details. + diff --git a/test.log b/test.log index c51d06b8..2db18301 100644 --- a/test.log +++ b/test.log @@ -1,38 +1,53 @@ Loading mkin Testing mkin ✔ | OK F W S | Context -✔ | 5 | Calculation of Akaike weights ✔ | 2 | Export dataset for reading into CAKE -✔ | 10 | Confidence intervals and p-values [9.7 s] -✔ | 14 | Error model fitting [36.9 s] -✔ | 4 | Calculation of FOCUS chi2 error levels [2.2 s] -✔ | 13 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [3.3 s] -✔ | 6 | Test fitting the decline of metabolites from their maximum [0.7 s] -✔ | 1 | Fitting the logistic model [0.9 s] +✔ | 13 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [3.8 s] +✔ | 4 | Calculation of FOCUS chi2 error levels [2.3 s] +✔ | 4 | Fitting the SFORB model [1.7 s] +✔ | 5 | Calculation of Akaike weights +✔ | 10 | Confidence intervals and p-values [10.2 s] +✔ | 14 | Error model fitting [40.7 s] +✔ | 6 | Test fitting the decline of metabolites from their maximum [0.8 s] +✔ | 1 | Fitting the logistic model [1.0 s] ✔ | 1 | Test dataset class mkinds used in gmkin -✔ | 12 | Special cases of mkinfit calls [2.4 s] +✖ | 11 1 | Special cases of mkinfit calls [2.3 s] +──────────────────────────────────────────────────────────────────────────────── +test_mkinfit_errors.R:64: failure: We get reproducible output if quiet = FALSE +Results have changed from known value recorded in 'DFOP_FOCUS_C_messages.txt'. +2/165 mismatches +x[84]: "Sum of squared residuals at call 57: 4.364077" +y[84]: "Sum of squared residuals at call 57: 4.364078" + +x[105]: "85.00134 -0.7776046 -4.025878 1.248775 " +y[105]: "85.00135 -0.7776046 -4.025878 1.248775 " +──────────────────────────────────────────────────────────────────────────────── ✔ | 9 | mkinmod model generation and printing [0.2 s] ✔ | 3 | Model predictions with mkinpredict [0.3 s] -✔ | 16 | Evaluations according to 2015 NAFTA guidance [4.1 s] -✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.3 s] +✔ | 16 | Evaluations according to 2015 NAFTA guidance [4.3 s] +✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.2 s] ✔ | 3 | Summary -✔ | 11 | Plotting [0.6 s] +✖ | 10 1 | Plotting [0.6 s] +──────────────────────────────────────────────────────────────────────────────── +test_plots_summary_twa.R:118: failure: Plotting mkinfit and mmkin objects is reproducible +Figures don't match: plot-errmod-with-sfo-lin-a-obs.svg + +──────────────────────────────────────────────────────────────────────────────── ✔ | 4 | AIC calculation ✔ | 2 | Residuals extracted from mkinfit models -✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [5.3 s] -✔ | 4 | Fitting the SFORB model [1.7 s] +✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [5.6 s] ✔ | 1 | Summaries of old mkinfit objects -✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [7.2 s] -✔ | 7 1 | Hypothesis tests [32.3 s] +✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [7.4 s] +✔ | 7 1 | Hypothesis tests [33.6 s] ──────────────────────────────────────────────────────────────────────────────── test_tests.R:60: skip: We can do a likelihood ratio test using an update specification Reason: This errors out if called by testthat while it works in a normal R session ──────────────────────────────────────────────────────────────────────────────── ══ Results ═════════════════════════════════════════════════════════════════════ -Duration: 110.2 s +Duration: 117.3 s -OK: 138 -Failed: 0 +OK: 136 +Failed: 2 Warnings: 0 Skipped: 1 diff --git a/tests/figs/plotting/plot-errmod-with-sfo-lin-a-obs.svg b/tests/figs/plotting/plot-errmod-with-sfo-lin-a-obs.svg index 2b4930ba..7ba81d7b 100644 --- a/tests/figs/plotting/plot-errmod-with-sfo-lin-a-obs.svg +++ b/tests/figs/plotting/plot-errmod-with-sfo-lin-a-obs.svg @@ -156,7 +156,7 @@ 5 10 15 -20 +20 25 30 @@ -186,7 +186,7 @@ - + @@ -222,7 +222,7 @@ - + diff --git a/tests/testthat/DFOP_FOCUS_C_messages.txt b/tests/testthat/DFOP_FOCUS_C_messages.txt index 78438d06..c36f11db 100644 --- a/tests/testthat/DFOP_FOCUS_C_messages.txt +++ b/tests/testthat/DFOP_FOCUS_C_messages.txt @@ -81,7 +81,7 @@ Sum of squared residuals at call 55: 4.364078 85.01633 -0.7763163 -4.027611 1.248897 Sum of squared residuals at call 56: 4.364078 85.01633 -0.7763164 -4.027611 1.248897 -Sum of squared residuals at call 57: 4.364078 +Sum of squared residuals at call 57: 4.364077 85.01633 -0.7763163 -4.027611 1.248897 85.01633 -0.7763163 -4.027611 1.248897 85.00894 -0.7777917 -4.026307 1.24772 @@ -102,7 +102,7 @@ Sum of squared residuals at call 67: 4.362751 85.00518 -0.7773082 -4.026004 1.248453 85.00134 -0.7776046 -4.025878 1.248775 Sum of squared residuals at call 70: 4.362721 -85.00135 -0.7776046 -4.025878 1.248775 +85.00134 -0.7776046 -4.025878 1.248775 Sum of squared residuals at call 71: 4.362721 85.00134 -0.7776046 -4.025878 1.248775 Sum of squared residuals at call 72: 4.362721 diff --git a/tests/testthat/FOCUS_2006_D.csf b/tests/testthat/FOCUS_2006_D.csf index 358b50e3..a7f8edaf 100644 --- a/tests/testthat/FOCUS_2006_D.csf +++ b/tests/testthat/FOCUS_2006_D.csf @@ -5,7 +5,7 @@ Description: MeasurementUnits: % AR TimeUnits: days Comments: Created using mkin::CAKE_export -Date: 2019-11-13 +Date: 2020-03-31 Optimiser: IRLS [Data] -- cgit v1.2.1