From 35eaf4f7bac89b249ff488e4e3021d4226ed9e23 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 15 Sep 2021 11:22:36 +0200 Subject: Correction of the dimethenamid dataset The data given in previous mkin versions for "Borstel 2" (Staudenmaier 2013) are in fact a subset of the "Borstel 1" data, with the "Borstel 2" data simply being further analysed for isomer composition by Staudenmaier (2013). While correcting this, the URL of the RAR published by EFSA was updated, as the EFSA Register of Questions was replaced by the Open EFSA portal. This also affects the recent publication in "Environments" [1], where these two datasets were pooled. However, the influence on the final results can be expected to be minimal. Out of the 16 observations for the Borstel soil, five were erroneously duplicated which just changes the weight of the different sampling points and modifies the variance. The conclusions of the publication are qualitative and are not considered to be affected. [1] https://doi.org/10.3390/environments8080071 --- R/dimethenamid_2018.R | 4 ++-- data/dimethenamid_2018.rda | Bin 8231 -> 7945 bytes inst/dataset_generation/dimethenamid_2018.R | 24 ++++++++---------------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/R/dimethenamid_2018.R b/R/dimethenamid_2018.R index 189da618..1a7e14a2 100644 --- a/R/dimethenamid_2018.R +++ b/R/dimethenamid_2018.R @@ -11,11 +11,11 @@ #' in the 'dataset_generation' directory. In the code, page numbers are given for #' specific pieces of information in the comments. #' -#' @format An [mkindsg] object grouping eight datasets with some meta information +#' @format An [mkindsg] object grouping seven datasets with some meta information #' @source Rapporteur Member State Germany, Co-Rapporteur Member State Bulgaria (2018) #' Renewal Assessment Report Dimethenamid-P Volume 3 - B.8 Environmental fate and behaviour #' Rev. 2 - November 2017 -#' \url{http://registerofquestions.efsa.europa.eu/roqFrontend/outputLoader?output=ON-5211} +#' \url{https://open.efsa.europa.eu/study-inventory/EFSA-Q-2014-00716} #' @examples #' print(dimethenamid_2018) "dimethenamid_2018" diff --git a/data/dimethenamid_2018.rda b/data/dimethenamid_2018.rda index dd3d934b..39168e9c 100644 Binary files a/data/dimethenamid_2018.rda and b/data/dimethenamid_2018.rda differ diff --git a/inst/dataset_generation/dimethenamid_2018.R b/inst/dataset_generation/dimethenamid_2018.R index 34a9dad1..52eef995 100644 --- a/inst/dataset_generation/dimethenamid_2018.R +++ b/inst/dataset_generation/dimethenamid_2018.R @@ -15,15 +15,7 @@ dimethenamid_2018 <- mkindsg$new( ) ) ), - mkinds$new("Borstel 1", # p. 22 - mkin_wide_to_long( - data.frame( - t = c(0, 28, 58, 89, 119), - DMTAP = c(100.5, 51.4, 26.8, 15.7, 7.9) - ) - ) - ), - mkinds$new("Borstel 2", # p. 19/20 + mkinds$new("Borstel", # p. 19/20 mkin_wide_to_long( data.frame( t = rep(c(0, 2, 7, 14, 28, 58, 89, 119), each = 2), @@ -134,20 +126,20 @@ dimethenamid_2018 <- mkindsg$new( # but the FOCUS generic guidance suggests them to be equivalent to the USDA # classes with the same name meta = data.frame( - study = c("Unsworth 2014", "Staudenmaier 2013", "Staudenmaier 2009", + study = c("Unsworth 2014", "Staudenmaier 2009", rep("Wendt 1997", 2), "König 1996", rep("König 1995", 2)), - usda_soil_type = c("Sandy loam", rep("Sand", 2), + usda_soil_type = c("Sandy loam", "Sand", rep("Clay loam", 2), "Sandy clay loam", "Loamy sand", "Sandy loam"), - study_moisture_ref_type = c("pF2", rep("pF1", 2), + study_moisture_ref_type = c("pF2", "pF1", rep("pF2.5", 2), rep("pF1", 3)), - rel_moisture = c(1, rep(0.5, 2), + rel_moisture = c(1, 0.5, rep(0.75, 2), rep(0.4, 3)), - study_ref_moisture = c(NA, rep(23, 2), rep(33.37, 2), rep(NA, 3)), - temperature = c(20, rep(20, 2), + study_ref_moisture = c(NA, 23, rep(33.37, 2), rep(NA, 3)), + temperature = c(20, 20, rep(23, 2), rep(20, 3)) ) ) -f_time_norm_focus(dimethenamid_2018) +f_time_norm_focus(dimethenamid_2018) # This modifies the R6 object in place save(dimethenamid_2018, file = "data/dimethenamid_2018.rda", version = 2) -- cgit v1.2.1 From 79c335835849e5f9f993f5458c218fea81b8f4ba Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 15 Sep 2021 12:18:28 +0200 Subject: Update link for travis badge --- README.html | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.html b/README.html index c0169880..844fc536 100644 --- a/README.html +++ b/README.html @@ -366,7 +366,7 @@ pre code {

mkin

-

Build Status codecov

+

Build Status codecov

The R package mkin provides calculation routines for the analysis of chemical degradation data, including multicompartment kinetics as needed for modelling the formation and decline of transformation products, or if several degradation compartments are involved.

Installation

diff --git a/README.md b/README.md index 8873202b..1183abff 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # mkin [![](https://www.r-pkg.org/badges/version/mkin)](https://cran.r-project.org/package=mkin) -[![Build Status](https://travis-ci.com/jranke/mkin.svg?branch=master)](https://travis-ci.com/jranke/mkin) +[![Build Status](https://travis-ci.com/jranke/mkin.svg?branch=master)](https://app.travis-ci.com/github/jranke/mkin) [![codecov](https://codecov.io/github/jranke/mkin/branch/master/graphs/badge.svg)](https://codecov.io/github/jranke/mkin) The R package **mkin** provides calculation routines for the analysis of -- cgit v1.2.1 From e64679bbe4eb81c08e634eae80116820549e83a9 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 15 Sep 2021 14:06:18 +0200 Subject: Try to make remotes::install_github work again --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 76a83e64..ceaee76f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ r_packages: - devtools - covr - vdiffr +env: GITHUB_PAT= r_github_packages: - saemixdevelopment/saemixextension@master script: -- cgit v1.2.1 From 9b6575b6a35b3a5e112f8978f47a1578947ef54f Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 15 Sep 2021 14:56:14 +0200 Subject: Use my drat repo for saemix master --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ceaee76f..d47e2e8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,14 +9,12 @@ addons: cache: packages repos: CRAN: https://cloud.r-project.org + https: https://jranke.github.io/drat r_packages: - nlme - devtools - covr - vdiffr -env: GITHUB_PAT= -r_github_packages: - - saemixdevelopment/saemixextension@master script: - R CMD build . - R CMD check --no-tests mkin_*.tar.gz -- cgit v1.2.1 From fab885edd66b6a1d2e660ee6aa70d14474330697 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 15 Sep 2021 15:30:02 +0200 Subject: Update test result to corrected data, version bump --- DESCRIPTION | 6 +++--- build.log | 2 +- check.log | 19 ++++++------------- man/dimethenamid_2018.Rd | 4 ++-- test.log | 16 ++++++++-------- tests/testthat/test_f_time_norm.R | 2 +- 6 files changed, 21 insertions(+), 28 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f5b7f070..8450ead0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: mkin Type: Package Title: Kinetic Evaluation of Chemical Degradation Data -Version: 1.0.4 -Date: 2021-04-20 +Version: 1.0.5 +Date: 2021-09-15 Authors@R: c( person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "jranke@uni-bremen.de", @@ -31,4 +31,4 @@ VignetteBuilder: knitr BugReports: https://github.com/jranke/mkin/issues/ URL: https://pkgdown.jrwb.de/mkin/ Roxygen: list(markdown = TRUE) -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 diff --git a/build.log b/build.log index e94b33f0..13f76240 100644 --- a/build.log +++ b/build.log @@ -6,5 +6,5 @@ * creating vignettes ... OK * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories -* building ‘mkin_1.0.4.tar.gz’ +* building ‘mkin_1.0.5.tar.gz’ diff --git a/check.log b/check.log index b848a900..33cb3a0e 100644 --- a/check.log +++ b/check.log @@ -1,16 +1,14 @@ * using log directory ‘/home/jranke/git/mkin/mkin.Rcheck’ -* using R version 4.0.5 (2021-03-31) +* using R version 4.1.1 (2021-08-10) * 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 ‘1.0.4’ +* this is package ‘mkin’ version ‘1.0.5’ * package encoding: UTF-8 -* checking CRAN incoming feasibility ... NOTE +* checking CRAN incoming feasibility ... Note_to_CRAN_maintainers Maintainer: ‘Johannes Ranke ’ - -The Date field is over a month old. * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK @@ -43,9 +41,7 @@ The Date field is over a month old. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK -* checking R code for possible problems ... NOTE -mmkin: possible error in Sys.info("sysname"): unused argument - ("sysname") +* checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK @@ -57,6 +53,7 @@ mmkin: possible error in Sys.info("sysname"): unused argument * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK +* checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK @@ -71,9 +68,5 @@ mmkin: possible error in Sys.info("sysname"): unused argument * checking for detritus in the temp directory ... OK * DONE -Status: 2 NOTEs -See - ‘/home/jranke/git/mkin/mkin.Rcheck/00check.log’ -for details. - +Status: OK diff --git a/man/dimethenamid_2018.Rd b/man/dimethenamid_2018.Rd index b6f761e8..6c251363 100644 --- a/man/dimethenamid_2018.Rd +++ b/man/dimethenamid_2018.Rd @@ -5,13 +5,13 @@ \alias{dimethenamid_2018} \title{Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018} \format{ -An \link{mkindsg} object grouping eight datasets with some meta information +An \link{mkindsg} object grouping seven datasets with some meta information } \source{ Rapporteur Member State Germany, Co-Rapporteur Member State Bulgaria (2018) Renewal Assessment Report Dimethenamid-P Volume 3 - B.8 Environmental fate and behaviour Rev. 2 - November 2017 -\url{http://registerofquestions.efsa.europa.eu/roqFrontend/outputLoader?output=ON-5211} +\url{https://open.efsa.europa.eu/study-inventory/EFSA-Q-2014-00716} } \usage{ dimethenamid_2018 diff --git a/test.log b/test.log index 1f477869..3ab6aa27 100644 --- a/test.log +++ b/test.log @@ -7,7 +7,7 @@ Loading required package: parallel ✔ | 5 | Calculation of Akaike weights ✔ | 2 | Export dataset for reading into CAKE ✔ | 12 | Confidence intervals and p-values [1.3 s] -✔ | 14 | Error model fitting [4.2 s] +✔ | 14 | Error model fitting [4.0 s] ✔ | 5 | Time step normalisation ✔ | 4 | Calculation of FOCUS chi2 error levels [0.5 s] ✔ | 14 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [0.7 s] @@ -19,19 +19,19 @@ Loading required package: parallel ✔ | 1 | mkinfit features [0.3 s] ✔ | 8 | mkinmod model generation and printing [0.2 s] ✔ | 3 | Model predictions with mkinpredict [0.3 s] -✔ | 16 | Evaluations according to 2015 NAFTA guidance [1.4 s] -✔ | 9 | Nonlinear mixed-effects models [7.9 s] +✔ | 16 | Evaluations according to 2015 NAFTA guidance [1.3 s] +✔ | 9 | Nonlinear mixed-effects models [7.7 s] ✔ | 14 | Plotting [1.1 s] ✔ | 4 | Residuals extracted from mkinfit models -✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [1.5 s] -✔ | 7 | Fitting the SFORB model [3.7 s] +✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [1.4 s] +✔ | 7 | Fitting the SFORB model [3.4 s] ✔ | 1 | Summaries of old mkinfit objects ✔ | 4 | Summary [0.1 s] -✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.2 s] +✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.1 s] ✔ | 9 | Hypothesis tests [8.0 s] -✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.4 s] +✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.2 s] ══ Results ═════════════════════════════════════════════════════════════════════ -Duration: 40.3 s +Duration: 39.0 s [ FAIL 0 | WARN 0 | SKIP 0 | PASS 174 ] diff --git a/tests/testthat/test_f_time_norm.R b/tests/testthat/test_f_time_norm.R index ca2ebd99..c5e0607c 100644 --- a/tests/testthat/test_f_time_norm.R +++ b/tests/testthat/test_f_time_norm.R @@ -13,7 +13,7 @@ test_that("Time step normalisation for a dataset works", { # Reference values from Dimethenamid RAR 2018 Vol3 B.8 expect_equal(round(dimethenamid_2018$f_time_norm, 3), c(1, - rep(0.971, 2), # p. 56 + 0.971, # p. 56 rep(round(1.329 * 0.924, 3), 2), # p. 51 0.623, 0.768, 0.673) # p. 45 ) -- cgit v1.2.1 From 2e77bf144a81852302571009b1fcd41f021eca4c Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 15 Sep 2021 16:54:49 +0200 Subject: Fix Open EFSA URL, changelog for 1.0.5 The EFSA URL failed on winbuilder because some cookie sets a different domain, so I am now using \href{} with the full link as link text instead of \url{} --- NEWS.md | 4 ++++ R/dimethenamid_2018.R | 2 +- man/dimethenamid_2018.Rd | 2 +- test.log | 8 ++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 1dd32edb..e8a57aba 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# mkin 1.0.5 (2021-09-15) + +- 'dimethenamid_2018': Correct the data for the Borstel soil. The five observations from Staudenmaier (2013) that were previously stored as "Borstel 2" are actually just a subset of the 16 observations in "Borstel 1" which is now simply "Borstel" + # mkin 1.0.4 (2021-04-20) - All plotting functions setting graphical parameters: Use on.exit() for resetting graphical parameters diff --git a/R/dimethenamid_2018.R b/R/dimethenamid_2018.R index 1a7e14a2..0d8f681f 100644 --- a/R/dimethenamid_2018.R +++ b/R/dimethenamid_2018.R @@ -15,7 +15,7 @@ #' @source Rapporteur Member State Germany, Co-Rapporteur Member State Bulgaria (2018) #' Renewal Assessment Report Dimethenamid-P Volume 3 - B.8 Environmental fate and behaviour #' Rev. 2 - November 2017 -#' \url{https://open.efsa.europa.eu/study-inventory/EFSA-Q-2014-00716} +#' \href{https://open.efsa.europa.eu}{https://open.efsa.europa.eu/study-inventory/EFSA-Q-2014-00716} #' @examples #' print(dimethenamid_2018) "dimethenamid_2018" diff --git a/man/dimethenamid_2018.Rd b/man/dimethenamid_2018.Rd index 6c251363..31a05a26 100644 --- a/man/dimethenamid_2018.Rd +++ b/man/dimethenamid_2018.Rd @@ -11,7 +11,7 @@ An \link{mkindsg} object grouping seven datasets with some meta information Rapporteur Member State Germany, Co-Rapporteur Member State Bulgaria (2018) Renewal Assessment Report Dimethenamid-P Volume 3 - B.8 Environmental fate and behaviour Rev. 2 - November 2017 -\url{https://open.efsa.europa.eu/study-inventory/EFSA-Q-2014-00716} +\href{https://open.efsa.europa.eu}{https://open.efsa.europa.eu/study-inventory/EFSA-Q-2014-00716} } \usage{ dimethenamid_2018 diff --git a/test.log b/test.log index 3ab6aa27..717413ae 100644 --- a/test.log +++ b/test.log @@ -18,20 +18,20 @@ Loading required package: parallel ✔ | 10 | Special cases of mkinfit calls [0.3 s] ✔ | 1 | mkinfit features [0.3 s] ✔ | 8 | mkinmod model generation and printing [0.2 s] -✔ | 3 | Model predictions with mkinpredict [0.3 s] +✔ | 3 | Model predictions with mkinpredict [0.4 s] ✔ | 16 | Evaluations according to 2015 NAFTA guidance [1.3 s] ✔ | 9 | Nonlinear mixed-effects models [7.7 s] ✔ | 14 | Plotting [1.1 s] ✔ | 4 | Residuals extracted from mkinfit models ✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [1.4 s] -✔ | 7 | Fitting the SFORB model [3.4 s] +✔ | 7 | Fitting the SFORB model [3.5 s] ✔ | 1 | Summaries of old mkinfit objects ✔ | 4 | Summary [0.1 s] ✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.1 s] -✔ | 9 | Hypothesis tests [8.0 s] +✔ | 9 | Hypothesis tests [7.9 s] ✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.2 s] ══ Results ═════════════════════════════════════════════════════════════════════ -Duration: 39.0 s +Duration: 38.8 s [ FAIL 0 | WARN 0 | SKIP 0 | PASS 174 ] -- cgit v1.2.1