From 24eb77216700cf8b2f2bde3abad84c1f83f9e32a Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 9 Jan 2023 06:22:04 +0100 Subject: Prebuilt PDF vignettes, summary_listing --- .Rbuildignore | 2 + .gitignore | 4 + DESCRIPTION | 2 +- GNUmakefile | 7 +- NAMESPACE | 2 + R/hierarchical_kinetics.R | 2 +- R/summary_listing.R | 59 + R/tex_listing.R | 32 - README.md | 2 + _pkgdown.yml | 3 +- docs/dev/articles/2022_wp_1.1_dmta_parent.html | 2177 ++++++++++++++++++++ .../figure-html/convergence-saem-dfop-const-1.png | Bin 0 -> 128154 bytes .../figure-html/convergence-saem-dfop-tc-1.png | Bin 0 -> 109761 bytes .../convergence-saem-dfop-tc-no-ranef-k2-1.png | Bin 0 -> 123528 bytes .../figure-html/convergence-saem-fomc-const-1.png | Bin 0 -> 100169 bytes .../figure-html/convergence-saem-fomc-tc-1.png | Bin 0 -> 93007 bytes .../figure-html/convergence-saem-hs-const-1.png | Bin 0 -> 129829 bytes .../figure-html/convergence-saem-hs-tc-1.png | Bin 0 -> 98778 bytes .../figure-html/convergence-saem-sfo-const-1.png | Bin 0 -> 75641 bytes .../figure-html/convergence-saem-sfo-tc-1.png | Bin 0 -> 62897 bytes .../figure-html/multistart-full-par-1.png | Bin 0 -> 71232 bytes .../figure-html/multistart-reduced-par-1.png | Bin 0 -> 66297 bytes .../multistart-reduced-par-llquant-1.png | Bin 0 -> 58713 bytes .../plot-saem-dfop-tc-no-ranef-k2-1.png | Bin 0 -> 159042 bytes docs/dev/articles/index.html | 6 +- docs/dev/authors.html | 6 +- docs/dev/index.html | 24 +- docs/dev/news/index.html | 6 +- docs/dev/pkgdown.yml | 5 +- .../reference/example_analysis/dlls/sforb_sfo2.so | Bin 0 -> 17272 bytes .../example_analysis/example_analysis.Rmd | 314 +++ docs/dev/reference/example_analysis/header.tex | 1 + docs/dev/reference/example_analysis/skeleton.pdf | Bin 0 -> 351780 bytes .../figure-latex/unnamed-chunk-11-1.pdf | Bin 0 -> 30166 bytes .../figure-latex/unnamed-chunk-16-1.pdf | Bin 0 -> 30137 bytes .../figure-latex/unnamed-chunk-6-1.pdf | Bin 0 -> 16408 bytes .../figure-latex/unnamed-chunk-9-1.pdf | Bin 0 -> 16043 bytes docs/dev/reference/hierarchical_kinetics.html | 154 ++ docs/dev/reference/index.html | 10 +- docs/dev/reference/mkinmod.html | 10 +- docs/dev/reference/summary_listing.html | 147 ++ docs/dev/sitemap.xml | 9 + inst/testdata/cyantraniliprole_soil_efsa_2014.xlsx | Bin 0 -> 35878 bytes log/check.log | 34 +- man/hierarchical_kinetics.Rd | 2 +- man/mkinmod.Rd | 2 +- man/summary_listing.Rd | 27 + man/tex_listing.Rd | 21 - vignettes/FOCUS_D.html | 44 +- vignettes/FOCUS_L.html | 215 +- vignettes/dmta_parent_2022_prebuilt.rnw | 7 + vignettes/dmta_pathway_2022_prebuilt.rnw | 7 + vignettes/mkin.html | 310 ++- vignettes/prebuilt/2022_cyan_pathway.rmd | 536 +++++ vignettes/prebuilt/2022_dmta_parent.rmd | 406 ++++ vignettes/prebuilt/2022_dmta_pathway.rmd | 426 ++++ vignettes/prebuilt/references.bib | 187 ++ vignettes/references.bib | 34 +- vignettes/twa.html | 108 +- vignettes/web_only/FOCUS_Z.R | 115 ++ vignettes/web_only/FOCUS_Z.html | 278 ++- vignettes/web_only/benchmarks.R | 114 + vignettes/web_only/benchmarks.html | 193 +- vignettes/web_only/compiled_models.R | 65 + vignettes/web_only/compiled_models.html | 230 ++- vignettes/web_only/dimethenamid_2018.R | 152 ++ vignettes/web_only/dimethenamid_2018.html | 365 +++- .../figure-html/f_parent_mkin_dfop_const-1.png | Bin 58608 -> 57786 bytes .../f_parent_mkin_dfop_const_test-1.png | Bin 58777 -> 57786 bytes .../figure-html/f_parent_mkin_dfop_tc_test-1.png | Bin 60062 -> 59396 bytes .../figure-html/f_parent_mkin_sfo_const-1.png | Bin 56694 -> 55982 bytes .../figure-html/f_parent_saemix_sfo_tc-1.png | Bin 28655 -> 28538 bytes .../figure-html/plot_parent_nlme-1.png | Bin 59194 -> 59192 bytes vignettes/web_only/mkin_benchmarks.rda | Bin 1650 -> 1722 bytes 74 files changed, 6255 insertions(+), 607 deletions(-) create mode 100644 R/summary_listing.R delete mode 100644 R/tex_listing.R create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent.html create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-const-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-tc-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-tc-no-ranef-k2-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-fomc-const-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-fomc-tc-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-hs-const-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-hs-tc-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-sfo-const-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-sfo-tc-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-full-par-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-reduced-par-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-reduced-par-llquant-1.png create mode 100644 docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/plot-saem-dfop-tc-no-ranef-k2-1.png create mode 100755 docs/dev/reference/example_analysis/dlls/sforb_sfo2.so create mode 100644 docs/dev/reference/example_analysis/example_analysis.Rmd create mode 100644 docs/dev/reference/example_analysis/header.tex create mode 100644 docs/dev/reference/example_analysis/skeleton.pdf create mode 100644 docs/dev/reference/example_analysis/skeleton_files/figure-latex/unnamed-chunk-11-1.pdf create mode 100644 docs/dev/reference/example_analysis/skeleton_files/figure-latex/unnamed-chunk-16-1.pdf create mode 100644 docs/dev/reference/example_analysis/skeleton_files/figure-latex/unnamed-chunk-6-1.pdf create mode 100644 docs/dev/reference/example_analysis/skeleton_files/figure-latex/unnamed-chunk-9-1.pdf create mode 100644 docs/dev/reference/hierarchical_kinetics.html create mode 100644 docs/dev/reference/summary_listing.html create mode 100644 inst/testdata/cyantraniliprole_soil_efsa_2014.xlsx create mode 100644 man/summary_listing.Rd delete mode 100644 man/tex_listing.Rd create mode 100644 vignettes/dmta_parent_2022_prebuilt.rnw create mode 100644 vignettes/dmta_pathway_2022_prebuilt.rnw create mode 100644 vignettes/prebuilt/2022_cyan_pathway.rmd create mode 100644 vignettes/prebuilt/2022_dmta_parent.rmd create mode 100644 vignettes/prebuilt/2022_dmta_pathway.rmd create mode 100644 vignettes/prebuilt/references.bib create mode 100644 vignettes/web_only/FOCUS_Z.R create mode 100644 vignettes/web_only/benchmarks.R create mode 100644 vignettes/web_only/compiled_models.R create mode 100644 vignettes/web_only/dimethenamid_2018.R diff --git a/.Rbuildignore b/.Rbuildignore index 70eef830..7e13343b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -28,6 +28,8 @@ ^vignettes/.*.synctex.gz ^vignettes/.*.toc$ ^vignettes/figure +^vignettes/prebuilt/*_dlls +^vignettes/prebuilt/*.pdf ^vignettes/FOCUS_Z.tex$ ^vignettes/mkin.tex$ ^vignettes/mkin_benchmarks.rda$ diff --git a/.gitignore b/.gitignore index a86197a1..5bec45e6 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,7 @@ vignettes/cache/ vignettes/figure/ vignettes/*_cache/ vignettes/*_files/ +vignettes/prebuilt/*_cache +vignettes/prebuilt/*_files +vignettes/prebuilt/*_dlls +vignettes/prebuilt/*.pdf diff --git a/DESCRIPTION b/DESCRIPTION index d061a5a9..50dba006 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: mkin Type: Package Title: Kinetic Evaluation of Chemical Degradation Data Version: 1.2.2 -Date: 2023-01-03 +Date: 2023-01-08 Authors@R: c( person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "johannes.ranke@jrwb.de", diff --git a/GNUmakefile b/GNUmakefile index 4a33c538..9f268335 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -37,10 +37,6 @@ pkgfiles = \ all: build $(TGZ): $(pkgfiles) vignettes - $(RM) -r vignettes/*_cache - $(RM) -r vignettes/*_files - $(RM) -r vignettes/*.R - $(RM) -r vignettes/web_only/*.R $(RM) Rplots.pdf "$(RBIN)/R" CMD build . 2>&1 | tee log/build.log @@ -111,7 +107,8 @@ vignettes: vignettes/mkin.html vignettes/FOCUS_D.html vignettes/FOCUS_L.html vig vignettes/web_only/%.html: vignettes/references.bib vignettes/web_only/%.rmd "$(RBIN)/Rscript" -e "tools::buildVignette(file = 'vignettes/web_only/$*.rmd', dir = 'vignettes/web_only', keep=c('mkin_benchmarks.rda', 'saem_benchmarks.rda'))" -articles: vignettes/web_only/FOCUS_Z.html vignettes/web_only/compiled_models.html vignettes/web_only/benchmarks.html vignettes/web_only/dimethenamid_2018.html vignettes/web_only/multistart.html +vignettes/prebuilt/%.pdf: vignettes/prebuilt/references.bib vignettes/prebuilt/%.rmd + "$(RBIN)/Rscript" -e "rmarkdown::render('vignettes/prebuilt/$*.rmd')" pd: roxygen "$(RBIN)/Rscript" -e "pkgdown::build_site(run_dont_run = TRUE, lazy = TRUE)" diff --git a/NAMESPACE b/NAMESPACE index 84d6b713..b41bf614 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -97,6 +97,7 @@ export(endpoints) export(f_time_norm_focus) export(get_deg_func) export(hierarchical_kinetics) +export(html_listing) export(illparms) export(ilr) export(intervals) @@ -145,6 +146,7 @@ export(set_nd_nq) export(set_nd_nq_focus) export(sigma_twocomp) export(status) +export(summary_listing) export(tex_listing) export(transform_odeparms) export(which.best) diff --git a/R/hierarchical_kinetics.R b/R/hierarchical_kinetics.R index a90dd619..e545754a 100644 --- a/R/hierarchical_kinetics.R +++ b/R/hierarchical_kinetics.R @@ -13,7 +13,7 @@ #' #' \dontrun{ #' library(rmarkdown) -#' draft("New analysis.rmd", template = "hierarchical_kinetics", package = "mkin") +#' draft("example_analysis.rmd", template = "hierarchical_kinetics", package = "mkin") #' } #' #' @export diff --git a/R/summary_listing.R b/R/summary_listing.R new file mode 100644 index 00000000..38b52240 --- /dev/null +++ b/R/summary_listing.R @@ -0,0 +1,59 @@ +#' Display the output of a summary function according to the output format +#' +#' This function is intended for use in a R markdown code chunk with the chunk +#' option `results = "asis"`. +#' +#' @param object The object for which the summary is to be listed +#' @param caption An optional caption +#' @param label An optional label, ignored in html output +#' @param clearpage Should a new page be started after the listing? Ignored in html output +#' @export +summary_listing <- function(object, caption = NULL, label = NULL, + clearpage = TRUE) { + if (knitr::is_latex_output()) { + tex_listing(object = object, caption = caption, label = label, + clearpage = clearpage) + } + if (knitr::is_html_output()) { + html_listing(object = object, caption = caption) + } +} + +#' @rdname summary_listing +#' @export +tex_listing <- function(object, caption = NULL, label = NULL, + clearpage = TRUE) { + cat("\n") + cat("\\begin{listing}", "\n") + if (!is.null(caption)) { + cat("\\caption{", caption, "}", "\n", sep = "") + } + if (!is.null(label)) { + cat("\\caption{", label, "}", "\n", sep = "") + } + cat("\\begin{snugshade}", "\n") + cat("\\scriptsize", "\n") + cat("\\begin{verbatim}", "\n") + cat(capture.output(suppressWarnings(summary(object))), sep = "\n") + cat("\n") + cat("\\end{verbatim}", "\n") + cat("\\end{snugshade}", "\n") + cat("\\end{listing}", "\n") + if (clearpage) { + cat("\\clearpage", "\n") + } +} + +#' @rdname summary_listing +#' @export +html_listing <- function(object, caption = NULL) { + cat("\n") + if (!is.null(caption)) { + cat("", caption, "", "\n", sep = "") + } + cat("
\n")
+  cat(capture.output(suppressWarnings(summary(object))), sep = "\n")
+  cat("\n")
+  cat("
\n") +} + diff --git a/R/tex_listing.R b/R/tex_listing.R deleted file mode 100644 index 05f662e4..00000000 --- a/R/tex_listing.R +++ /dev/null @@ -1,32 +0,0 @@ -#' Wrap the output of a summary function in tex listing environment -#' -#' This function can be used in a R markdown code chunk with the chunk -#' option `results = "asis"`. -#' -#' @param object The object for which the summary is to be listed -#' @param caption An optional caption -#' @param label An optional label -#' @param clearpage Should a new page be started after the listing? -#' @export -tex_listing <- function(object, caption = NULL, label = NULL, - clearpage = TRUE) { - cat("\n") - cat("\\begin{listing}", "\n") - if (!is.null(caption)) { - cat("\\caption{", caption, "}", "\n", sep = "") - } - if (!is.null(label)) { - cat("\\caption{", label, "}", "\n", sep = "") - } - cat("\\begin{snugshade}", "\n") - cat("\\scriptsize", "\n") - cat("\\begin{verbatim}", "\n") - cat(capture.output(suppressWarnings(summary(object))), sep = "\n") - cat("\n") - cat("\\end{verbatim}", "\n") - cat("\\end{snugshade}", "\n") - cat("\\end{listing}", "\n") - if (clearpage) { - cat("\\clearpage", "\n") - } -} diff --git a/README.md b/README.md index f3c36890..b6171767 100644 --- a/README.md +++ b/README.md @@ -214,6 +214,8 @@ to ModelMaker 4.0, 2014-2015) of the visual fit in the kinetic evaluation of degradation data, 2019-2020) - Project Number 146839 (Checking the feasibility of using mixed-effects models for the derivation of kinetic modelling parameters from degradation studies, 2020-2021) +- Project Number 173340 (Application of nonlinear hierarchical models to the + kinetic evaluation of chemical degradation data) Thanks to everyone involved for collaboration and support! diff --git a/_pkgdown.yml b/_pkgdown.yml index ca5ea6e0..5d7fdbf4 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -47,6 +47,7 @@ reference: - title: Mixed models desc: Create and work with nonlinear hierarchical models contents: + - hierarchical_kinetics - read_spreadsheet - nlme.mmkin - saem.mmkin @@ -92,7 +93,7 @@ reference: - plot.nafta - title: Utility functions contents: - - tex_listing + - summary_listing - f_time_norm_focus - set_nd_nq - max_twa_parent diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent.html b/docs/dev/articles/2022_wp_1.1_dmta_parent.html new file mode 100644 index 00000000..61bb81d3 --- /dev/null +++ b/docs/dev/articles/2022_wp_1.1_dmta_parent.html @@ -0,0 +1,2177 @@ + + + + + + + +Work package 1.1: Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P • mkin + + + + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+

Introduction +

+

The purpose of this document is to demonstrate how nonlinear +hierarchical models (NLHM) based on the parent degradation models SFO, +FOMC, DFOP and HS can be fitted with the mkin package.

+

The mkin package is used in version 1.2.2. It contains the test data +and the functions used in the evaluations. The saemix +package is used as a backend for fitting the NLHM, but is also loaded to +make the convergence plot function available.

+

This document is processed with the knitr package, which +also provides the kable function that is used to improve +the display of tabular data in R markdown documents. For parallel +processing, the parallel package is used.

+
+library(mkin)
+library(knitr)
+library(saemix)
+library(parallel)
+n_cores <- detectCores()
+if (Sys.info()["sysname"] == "Windows") {
+  cl <- makePSOCKcluster(n_cores)
+} else {
+  cl <- makeForkCluster(n_cores)
+}
+
+

Preprocessing of test data +

+

The test data are available in the mkin package as an object of class +mkindsg (mkin dataset group) under the identifier +dimethenamid_2018. The following preprocessing steps are +still necessary:

+
    +
  • The data available for the enantiomer dimethenamid-P (DMTAP) are +renamed to have the same substance name as the data for the racemic +mixture dimethenamid (DMTA). The reason for this is that no difference +between their degradation behaviour was identified in the EU risk +assessment.
  • +
  • The data for transformation products and unnecessary columns are +discarded
  • +
  • The observation times of each dataset are multiplied with the +corresponding normalisation factor also available in the dataset, in +order to make it possible to describe all datasets with a single set of +parameters that are independent of temperature
  • +
  • Finally, datasets observed in the same soil (Elliot 1 +and Elliot 2) are combined, resulting in dimethenamid +(DMTA) data from six soils.
  • +
+

The following commented R code performs this preprocessing.

+
+# Apply a function to each of the seven datasets in the mkindsg object to create a list
+dmta_ds <- lapply(1:7, function(i) {
+  ds_i <- dimethenamid_2018$ds[[i]]$data                     # Get a dataset
+  ds_i[ds_i$name == "DMTAP", "name"] <-  "DMTA"              # Rename DMTAP to DMTA
+  ds_i <- subset(ds_i, name == "DMTA", c("name", "time", "value")) # Select data
+  ds_i$time <- ds_i$time * dimethenamid_2018$f_time_norm[i]  # Normalise time
+  ds_i                                                       # Return the dataset
+})
+
+# Use dataset titles as names for the list elements
+names(dmta_ds) <- sapply(dimethenamid_2018$ds, function(ds) ds$title)
+
+# Combine data for Elliot soil to obtain a named list with six elements
+dmta_ds[["Elliot"]] <- rbind(dmta_ds[["Elliot 1"]], dmta_ds[["Elliot 2"]]) #
+dmta_ds[["Elliot 1"]] <- NULL
+dmta_ds[["Elliot 2"]] <- NULL
+

The following tables show the 6 datasets.

+
+for (ds_name in names(dmta_ds)) {
+    print(kable(mkin_long_to_wide(dmta_ds[[ds_name]]),
+      caption = paste("Dataset", ds_name),
+      label = paste0("tab:", ds_name), booktabs = TRUE))
+    cat("\n\\clearpage\n")
+}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dataset Calke
timeDMTA
095.8
098.7
1460.5
3039.1
5915.2
1204.8
1204.6
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dataset Borstel
timeDMTA
0.000000100.5
0.00000099.6
1.94129591.9
1.94129591.3
6.79453481.8
6.79453482.1
13.58906769.1
13.58906768.0
27.17813551.4
27.17813551.4
56.29756527.6
56.29756526.8
86.38764315.7
86.38764315.3
115.5070737.9
115.5070738.1
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dataset Flaach
timeDMTA
0.000000096.5
0.000000096.8
0.000000097.0
0.623385682.9
0.623385686.7
0.623385687.4
1.870156772.8
1.870156769.9
1.870156771.9
4.363698951.4
4.363698952.9
4.363698948.6
8.727397928.5
8.727397927.3
8.727397927.5
13.091096814.8
13.091096813.4
13.091096814.4
17.45479577.7
17.45479577.3
17.45479578.1
26.18219362.0
26.18219361.5
26.18219361.9
34.90959151.3
34.90959151.0
34.90959151.1
43.63698930.9
43.63698930.7
43.63698930.7
52.36438720.6
52.36438720.4
52.36438720.5
74.80626740.4
74.80626740.3
74.80626740.3
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dataset BBA 2.2
timeDMTA
0.000000098.09
0.000000098.77
0.767892293.52
0.767892292.03
2.303676588.39
2.303676587.18
5.375245269.38
5.375245271.06
10.750490445.21
10.750490446.81
16.125735530.54
16.125735530.07
21.500980721.60
21.500980720.41
32.25147119.10
32.25147119.70
43.00196146.58
43.00196146.31
53.75245183.47
53.75245183.52
64.50294213.40
64.50294213.67
91.37916801.62
91.37916801.62
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dataset BBA 2.3
timeDMTA
0.000000099.33
0.000000097.44
0.673393893.73
0.673393893.77
2.020181487.84
2.020181489.82
4.713756571.61
4.713756571.42
9.427513145.60
9.427513145.42
14.141269631.12
14.141269631.68
18.855026223.20
18.855026224.13
28.28253939.43
28.28253939.82
37.71005237.08
37.71005238.64
47.13756544.41
47.13756544.78
56.56507854.92
56.56507855.08
80.13386122.13
80.13386122.23
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dataset Elliot
timeDMTA
0.00000097.5
0.000000100.7
1.22847886.4
1.22847888.5
3.68543569.8
3.68543577.1
8.59934959.0
8.59934954.2
17.19869731.3
17.19869733.5
25.79804619.6
25.79804620.9
34.39739513.3
34.39739515.8
51.5960926.7
51.5960928.7
68.7947898.8
68.7947898.7
103.1921846.0
103.1921844.4
146.1889283.3
146.1889282.8
223.5830661.4
223.5830661.8
0.00000093.4
0.000000103.2
1.22847889.2
1.22847886.6
3.68543578.2
3.68543578.1
8.59934955.6
8.59934953.0
17.19869733.7
17.19869733.2
25.79804620.9
25.79804619.9
34.39739518.2
34.39739512.7
51.5960927.8
51.5960929.0
68.79478911.4
68.7947899.0
103.1921843.9
103.1921844.4
146.1889282.6
146.1889283.4
223.5830662.0
223.5830661.7
+
+
+
+

Separate evaluations +

+

In order to obtain suitable starting parameters for the NLHM fits, +separate fits of the four models to the data for each soil are generated +using the mmkin function from the mkin +package. In a first step, constant variance is assumed. Convergence is +checked with the status function.

+
+deg_mods <- c("SFO", "FOMC", "DFOP", "HS")
+f_sep_const <- mmkin(
+  deg_mods,
+  dmta_ds,
+  error_model = "const",
+  quiet = TRUE)
+
+status(f_sep_const) |> kable()
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CalkeBorstelFlaachBBA 2.2BBA 2.3Elliot
SFOOKOKOKOKOKOK
FOMCOKOKOKOKOKOK
DFOPOKOKOKOKOKOK
HSOKOKOKCOKOK
+

In the table above, OK indicates convergence, and C indicates failure +to converge. All separate fits with constant variance converged, with +the sole exception of the HS fit to the BBA 2.2 data. To prepare for +fitting NLHM using the two-component error model, the separate fits are +updated assuming two-component error.

+
+f_sep_tc <- update(f_sep_const, error_model = "tc")
+status(f_sep_tc) |> kable()
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CalkeBorstelFlaachBBA 2.2BBA 2.3Elliot
SFOOKOKOKOKOKOK
FOMCOKOKOKOKCOK
DFOPOKOKCOKCOK
HSOKCOKOKOKOK
+

Using the two-component error model, the one fit that did not +converge with constant variance did converge, but other non-SFO fits +failed to converge.

+
+
+

Hierarchichal model fits +

+

The following code fits eight versions of hierarchical models to the +data, using SFO, FOMC, DFOP and HS for the parent compound, and using +either constant variance or two-component error for the error model. The +default parameter distribution model in mkin allows for variation of all +degradation parameters across the assumed population of soils. In other +words, each degradation parameter is associated with a random effect as +a first step. The mhmkin function makes it possible to fit +all eight versions in parallel (given a sufficient number of computing +cores being available) to save execution time.

+

Convergence plots and summaries for these fits are shown in the +appendix.

+
+f_saem <- mhmkin(list(f_sep_const, f_sep_tc), transformations = "saemix")
+

The output of the status function shows that all fits +terminated successfully.

+
+status(f_saem) |> kable()
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
consttc
SFOOKOK
FOMCOKOK
DFOPOKOK
HSOKOK
+

The AIC and BIC values show that the biphasic models DFOP and HS give +the best fits.

+
+anova(f_saem) |> kable(digits = 1)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
nparAICBICLik
SFO const5796.3795.3-393.2
SFO tc6798.3797.1-393.2
FOMC const7734.2732.7-360.1
FOMC tc8720.4718.8-352.2
DFOP const9711.8710.0-346.9
HS const9714.0712.1-348.0
DFOP tc10665.5663.4-322.8
HS tc10667.1665.0-323.6
+

The DFOP model is preferred here, as it has a better mechanistic +basis for batch experiments with constant incubation conditions. Also, +it shows the lowest AIC and BIC values in the first set of fits when +combined with the two-component error model. Therefore, the DFOP model +was selected for further refinements of the fits with the aim to make +the model fully identifiable.

+
+

Parameter identifiability based on the Fisher Information +Matrix +

+

Using the illparms function, ill-defined statistical +model parameters such as standard deviations of the degradation +parameters in the population and error model parameters can be +found.

+
+illparms(f_saem) |> kable()
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
consttc
SFOb.1
FOMCsd(DMTA_0)
DFOPsd(k2)sd(k2)
HSsd(tb)
+

According to the illparms function, the fitted standard +deviation of the second kinetic rate constant k2 is +ill-defined in both DFOP fits. This suggests that different values would +be obtained for this standard deviation when using different starting +values.

+

The thus identified overparameterisation is addressed by removing the +random effect for k2 from the parameter model.

+
+f_saem_dfop_tc_no_ranef_k2 <- update(f_saem[["DFOP", "tc"]],
+  no_random_effect = "k2")
+

For the resulting fit, it is checked whether there are still +ill-defined parameters,

+
+illparms(f_saem_dfop_tc_no_ranef_k2)
+

which is not the case. Below, the refined model is compared with the +previous best model. The model without random effect for k2 +is a reduced version of the previous model. Therefore, the models are +nested and can be compared using the likelihood ratio test. This is +achieved with the argument test = TRUE to the +anova function.

+
+anova(f_saem[["DFOP", "tc"]], f_saem_dfop_tc_no_ranef_k2, test = TRUE) |>
+  kable(format.args = list(digits = 4))
+ ++++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
nparAICBICLikChisqDfPr(>Chisq)
f_saem_dfop_tc_no_ranef_k29663.8661.9-322.9NANANA
f_saem[[“DFOP”, “tc”]]10665.5663.4-322.80.280910.5961
+

The AIC and BIC criteria are lower after removal of the ill-defined +random effect for k2. The p value of the likelihood ratio +test is much greater than 0.05, indicating that the model with the +higher likelihood (here the model with random effects for all +degradation parameters f_saem[["DFOP", "tc"]]) does not fit +significantly better than the model with the lower likelihood (the +reduced model f_saem_dfop_tc_no_ranef_k2).

+

Therefore, AIC, BIC and likelihood ratio test suggest the use of the +reduced model.

+

The convergence of the fit is checked visually.

+
+Convergence plot for the NLHM DFOP fit with two-component error and without a random effect on 'k2'

+Convergence plot for the NLHM DFOP fit with two-component error and +without a random effect on ‘k2’ +

+
+

All parameters appear to have converged to a satisfactory degree. The +final fit is plotted using the plot method from the mkin package.

+
+plot(f_saem_dfop_tc_no_ranef_k2)
+
+Plot of the final NLHM DFOP fit

+Plot of the final NLHM DFOP fit +

+
+

Finally, a summary report of the fit is produced.

+
+summary(f_saem_dfop_tc_no_ranef_k2)
+
saemix version used for fitting:      3.2 
+mkin version used for pre-fitting:  1.2.2 
+R version used for fitting:         4.2.2 
+Date of fit:     Thu Jan  5 08:19:13 2023 
+Date of summary: Thu Jan  5 08:19:13 2023 
+
+Equations:
+d_DMTA/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
+           time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))
+           * DMTA
+
+Data:
+155 observations of 1 variable(s) grouped in 6 datasets
+
+Model predictions using solution type analytical 
+
+Fitted in 4.075 s
+Using 300, 100 iterations and 9 chains
+
+Variance model: Two-component variance function 
+
+Starting values for degradation parameters:
+   DMTA_0        k1        k2         g 
+98.759266  0.087034  0.009933  0.930827 
+
+Fixed degradation parameter values:
+None
+
+Starting values for random effects (square root of initial entries in omega):
+       DMTA_0 k1 k2 g
+DMTA_0  98.76  0  0 0
+k1       0.00  1  0 0
+k2       0.00  0  1 0
+g        0.00  0  0 1
+
+Starting values for error model parameters:
+a.1 b.1 
+  1   1 
+
+Results:
+
+Likelihood computed by importance sampling
+    AIC   BIC logLik
+  663.8 661.9 -322.9
+
+Optimised parameters:
+               est.     lower     upper
+DMTA_0    98.228939 96.285869 100.17201
+k1         0.064063  0.033477   0.09465
+k2         0.008297  0.005824   0.01077
+g          0.953821  0.914328   0.99331
+a.1        1.068479  0.869538   1.26742
+b.1        0.029424  0.022406   0.03644
+SD.DMTA_0  2.030437  0.404824   3.65605
+SD.k1      0.594692  0.256660   0.93272
+SD.g       1.006754  0.361327   1.65218
+
+Correlation: 
+   DMTA_0  k1      k2     
+k1  0.0218                
+k2  0.0556  0.0355        
+g  -0.0516 -0.0284 -0.2800
+
+Random effects:
+            est.  lower  upper
+SD.DMTA_0 2.0304 0.4048 3.6560
+SD.k1     0.5947 0.2567 0.9327
+SD.g      1.0068 0.3613 1.6522
+
+Variance model:
+       est.   lower   upper
+a.1 1.06848 0.86954 1.26742
+b.1 0.02942 0.02241 0.03644
+
+Estimated disappearance times:
+      DT50 DT90 DT50back DT50_k1 DT50_k2
+DMTA 11.45 41.4    12.46   10.82   83.54
+
+
+

Alternative check of parameter identifiability +

+

The parameter check used in the illparms function is +based on a quadratic approximation of the likelihood surface near its +optimum, which is calculated using the Fisher Information Matrix (FIM). +An alternative way to check parameter identifiability based on a +multistart approach has recently been implemented in mkin.

+

The graph below shows boxplots of the parameters obtained in 50 runs +of the saem algorithm with different parameter combinations, sampled +from the range of the parameters obtained for the individual datasets +fitted separately using nonlinear regression.

+
+f_saem_dfop_tc_multi <- multistart(f_saem[["DFOP", "tc"]], n = 50, cores = 15)
+
+par(mar = c(6.1, 4.1, 2.1, 2.1))
+parplot(f_saem_dfop_tc_multi, lpos = "bottomright", ylim = c(0.3, 10), las = 2)
+
+Scaled parameters from the multistart runs, full model

+Scaled parameters from the multistart runs, full model +

+
+

The graph clearly confirms the lack of identifiability of the +variance of k2 in the full model. The overparameterisation +of the model also indicates a lack of identifiability of the variance of +parameter g.

+

The parameter boxplots of the multistart runs with the reduced model +shown below indicate that all runs give similar results, regardless of +the starting parameters.

+
+f_saem_dfop_tc_no_ranef_k2_multi <- multistart(f_saem_dfop_tc_no_ranef_k2,
+  n = 50, cores = 15)
+
+par(mar = c(6.1, 4.1, 2.1, 2.1))
+parplot(f_saem_dfop_tc_no_ranef_k2_multi, ylim = c(0.5, 2), las = 2,
+  lpos = "bottomright")
+
+Scaled parameters from the multistart runs, reduced model

+Scaled parameters from the multistart runs, reduced model +

+
+

When only the parameters of the top 25% of the fits are shown (based +on a feature introduced in mkin 1.2.2 currently under development), the +scatter is even less as shown below.

+
+par(mar = c(6.1, 4.1, 2.1, 2.1))
+parplot(f_saem_dfop_tc_no_ranef_k2_multi, ylim = c(0.5, 2), las = 2, llquant = 0.25,
+  lpos = "bottomright")
+
+Scaled parameters from the multistart runs, reduced model, fits with the top 25\% likelihood values

+Scaled parameters from the multistart runs, reduced model, fits with the +top 25% likelihood values +

+
+
+
+
+

Conclusions +

+

Fitting the four parent degradation models SFO, FOMC, DFOP and HS as +part of hierarchical model fits with two different error models and +normal distributions of the transformed degradation parameters works +without technical problems. The biphasic models DFOP and HS gave the +best fit to the data, but the default parameter distribution model was +not fully identifiable. Removing the random effect for the second +kinetic rate constant of the DFOP model resulted in a reduced model that +was fully identifiable and showed the lowest values for the model +selection criteria AIC and BIC. The reliability of the identification of +all model parameters was confirmed using multiple starting values.

+
+
+

Appendix +

+
+

Hierarchical model fit listings +

+ +Hierarchical mkin fit of the SFO model with error model const + +

+saemix version used for fitting:      3.2 
+mkin version used for pre-fitting:  1.2.2 
+R version used for fitting:         4.2.2 
+Date of fit:     Thu Jan  5 08:19:06 2023 
+Date of summary: Thu Jan  5 08:20:11 2023 
+
+Equations:
+d_DMTA/dt = - k_DMTA * DMTA
+
+Data:
+155 observations of 1 variable(s) grouped in 6 datasets
+
+Model predictions using solution type analytical 
+
+Fitted in 1.09 s
+Using 300, 100 iterations and 9 chains
+
+Variance model: Constant variance 
+
+Starting values for degradation parameters:
+ DMTA_0  k_DMTA 
+97.2953  0.0566 
+
+Fixed degradation parameter values:
+None
+
+Starting values for random effects (square root of initial entries in omega):
+       DMTA_0 k_DMTA
+DMTA_0   97.3      0
+k_DMTA    0.0      1
+
+Starting values for error model parameters:
+a.1 
+  1 
+
+Results:
+
+Likelihood computed by importance sampling
+    AIC   BIC logLik
+  796.3 795.3 -393.2
+
+Optimised parameters:
+              est.    lower   upper
+DMTA_0    97.28130 95.71113 98.8515
+k_DMTA     0.05665  0.02909  0.0842
+a.1        2.66442  2.35579  2.9731
+SD.DMTA_0  1.54776  0.15447  2.9411
+SD.k_DMTA  0.60690  0.26248  0.9513
+
+Correlation: 
+       DMTA_0
+k_DMTA 0.0168
+
+Random effects:
+            est.  lower  upper
+SD.DMTA_0 1.5478 0.1545 2.9411
+SD.k_DMTA 0.6069 0.2625 0.9513
+
+Variance model:
+     est. lower upper
+a.1 2.664 2.356 2.973
+
+Estimated disappearance times:
+      DT50  DT90
+DMTA 12.24 40.65
+
+
+

+ +Hierarchical mkin fit of the SFO model with error model tc + +

+saemix version used for fitting:      3.2 
+mkin version used for pre-fitting:  1.2.2 
+R version used for fitting:         4.2.2 
+Date of fit:     Thu Jan  5 08:19:07 2023 
+Date of summary: Thu Jan  5 08:20:11 2023 
+
+Equations:
+d_DMTA/dt = - k_DMTA * DMTA
+
+Data:
+155 observations of 1 variable(s) grouped in 6 datasets
+
+Model predictions using solution type analytical 
+
+Fitted in 2.441 s
+Using 300, 100 iterations and 9 chains
+
+Variance model: Two-component variance function 
+
+Starting values for degradation parameters:
+  DMTA_0   k_DMTA 
+96.99175  0.05603 
+
+Fixed degradation parameter values:
+None
+
+Starting values for random effects (square root of initial entries in omega):
+       DMTA_0 k_DMTA
+DMTA_0  96.99      0
+k_DMTA   0.00      1
+
+Starting values for error model parameters:
+a.1 b.1 
+  1   1 
+
+Results:
+
+Likelihood computed by importance sampling
+    AIC   BIC logLik
+  798.3 797.1 -393.2
+
+Optimised parameters:
+               est.     lower    upper
+DMTA_0    97.271822 95.703157 98.84049
+k_DMTA     0.056638  0.029110  0.08417
+a.1        2.660081  2.230398  3.08976
+b.1        0.001665 -0.006911  0.01024
+SD.DMTA_0  1.545520  0.145035  2.94601
+SD.k_DMTA  0.606422  0.262274  0.95057
+
+Correlation: 
+       DMTA_0
+k_DMTA 0.0169
+
+Random effects:
+            est.  lower  upper
+SD.DMTA_0 1.5455 0.1450 2.9460
+SD.k_DMTA 0.6064 0.2623 0.9506
+
+Variance model:
+        est.     lower   upper
+a.1 2.660081  2.230398 3.08976
+b.1 0.001665 -0.006911 0.01024
+
+Estimated disappearance times:
+      DT50  DT90
+DMTA 12.24 40.65
+
+
+

+ +Hierarchical mkin fit of the FOMC model with error model const + +

+saemix version used for fitting:      3.2 
+mkin version used for pre-fitting:  1.2.2 
+R version used for fitting:         4.2.2 
+Date of fit:     Thu Jan  5 08:19:06 2023 
+Date of summary: Thu Jan  5 08:20:11 2023 
+
+Equations:
+d_DMTA/dt = - (alpha/beta) * 1/((time/beta) + 1) * DMTA
+
+Data:
+155 observations of 1 variable(s) grouped in 6 datasets
+
+Model predictions using solution type analytical 
+
+Fitted in 1.156 s
+Using 300, 100 iterations and 9 chains
+
+Variance model: Constant variance 
+
+Starting values for degradation parameters:
+ DMTA_0   alpha    beta 
+ 98.292   9.909 156.341 
+
+Fixed degradation parameter values:
+None
+
+Starting values for random effects (square root of initial entries in omega):
+       DMTA_0 alpha beta
+DMTA_0  98.29     0    0
+alpha    0.00     1    0
+beta     0.00     0    1
+
+Starting values for error model parameters:
+a.1 
+  1 
+
+Results:
+
+Likelihood computed by importance sampling
+    AIC   BIC logLik
+  734.2 732.7 -360.1
+
+Optimised parameters:
+              est.   lower   upper
+DMTA_0     98.3435 96.9033  99.784
+alpha       7.2007  2.5889  11.812
+beta      112.8746 34.8816 190.868
+a.1         2.0459  1.8054   2.286
+SD.DMTA_0   1.4795  0.2717   2.687
+SD.alpha    0.6396  0.1509   1.128
+SD.beta     0.6874  0.1587   1.216
+
+Correlation: 
+      DMTA_0  alpha  
+alpha -0.1125        
+beta  -0.1227  0.3632
+
+Random effects:
+            est.  lower upper
+SD.DMTA_0 1.4795 0.2717 2.687
+SD.alpha  0.6396 0.1509 1.128
+SD.beta   0.6874 0.1587 1.216
+
+Variance model:
+     est. lower upper
+a.1 2.046 1.805 2.286
+
+Estimated disappearance times:
+      DT50  DT90 DT50back
+DMTA 11.41 42.53     12.8
+
+
+

+ +Hierarchical mkin fit of the FOMC model with error model tc + +

+saemix version used for fitting:      3.2 
+mkin version used for pre-fitting:  1.2.2 
+R version used for fitting:         4.2.2 
+Date of fit:     Thu Jan  5 08:19:07 2023 
+Date of summary: Thu Jan  5 08:20:11 2023 
+
+Equations:
+d_DMTA/dt = - (alpha/beta) * 1/((time/beta) + 1) * DMTA
+
+Data:
+155 observations of 1 variable(s) grouped in 6 datasets
+
+Model predictions using solution type analytical 
+
+Fitted in 2.729 s
+Using 300, 100 iterations and 9 chains
+
+Variance model: Two-component variance function 
+
+Starting values for degradation parameters:
+DMTA_0  alpha   beta 
+98.772  4.663 92.597 
+
+Fixed degradation parameter values:
+None
+
+Starting values for random effects (square root of initial entries in omega):
+       DMTA_0 alpha beta
+DMTA_0  98.77     0    0
+alpha    0.00     1    0
+beta     0.00     0    1
+
+Starting values for error model parameters:
+a.1 b.1 
+  1   1 
+
+Results:
+
+Likelihood computed by importance sampling
+    AIC   BIC logLik
+  720.4 718.8 -352.2
+
+Optimised parameters:
+              est.    lower     upper
+DMTA_0    98.99136 97.26011 100.72261
+alpha      5.86312  2.57485   9.15138
+beta      88.55571 29.20889 147.90254
+a.1        1.51063  1.24384   1.77741
+b.1        0.02824  0.02040   0.03609
+SD.DMTA_0  1.57436 -0.04867   3.19739
+SD.alpha   0.59871  0.17132   1.02611
+SD.beta    0.72994  0.22849   1.23139
+
+Correlation: 
+      DMTA_0  alpha  
+alpha -0.1363        
+beta  -0.1414  0.2542
+
+Random effects:
+            est.    lower upper
+SD.DMTA_0 1.5744 -0.04867 3.197
+SD.alpha  0.5987  0.17132 1.026
+SD.beta   0.7299  0.22849 1.231
+
+Variance model:
+       est.  lower   upper
+a.1 1.51063 1.2438 1.77741
+b.1 0.02824 0.0204 0.03609
+
+Estimated disappearance times:
+      DT50 DT90 DT50back
+DMTA 11.11 42.6    12.82
+
+
+

+ +Hierarchical mkin fit of the DFOP model with error model const + +

+saemix version used for fitting:      3.2 
+mkin version used for pre-fitting:  1.2.2 
+R version used for fitting:         4.2.2 
+Date of fit:     Thu Jan  5 08:19:07 2023 
+Date of summary: Thu Jan  5 08:20:11 2023 
+
+Equations:
+d_DMTA/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
+           time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))
+           * DMTA
+
+Data:
+155 observations of 1 variable(s) grouped in 6 datasets
+
+Model predictions using solution type analytical 
+
+Fitted in 2.007 s
+Using 300, 100 iterations and 9 chains
+
+Variance model: Constant variance 
+
+Starting values for degradation parameters:
+  DMTA_0       k1       k2        g 
+98.64383  0.09211  0.02999  0.76814 
+
+Fixed degradation parameter values:
+None
+
+Starting values for random effects (square root of initial entries in omega):
+       DMTA_0 k1 k2 g
+DMTA_0  98.64  0  0 0
+k1       0.00  1  0 0
+k2       0.00  0  1 0
+g        0.00  0  0 1
+
+Starting values for error model parameters:
+a.1 
+  1 
+
+Results:
+
+Likelihood computed by importance sampling
+    AIC BIC logLik
+  711.8 710 -346.9
+
+Optimised parameters:
+               est.     lower    upper
+DMTA_0    98.092481 96.573898 99.61106
+k1         0.062499  0.030336  0.09466
+k2         0.009065 -0.005133  0.02326
+g          0.948967  0.862079  1.03586
+a.1        1.821671  1.604774  2.03857
+SD.DMTA_0  1.677785  0.472066  2.88350
+SD.k1      0.634962  0.270788  0.99914
+SD.k2      1.033498 -0.205994  2.27299
+SD.g       1.710046  0.428642  2.99145
+
+Correlation: 
+   DMTA_0  k1      k2     
+k1  0.0246                
+k2  0.0491  0.0953        
+g  -0.0552 -0.0889 -0.4795
+
+Random effects:
+           est.   lower  upper
+SD.DMTA_0 1.678  0.4721 2.8835
+SD.k1     0.635  0.2708 0.9991
+SD.k2     1.033 -0.2060 2.2730
+SD.g      1.710  0.4286 2.9914
+
+Variance model:
+     est. lower upper
+a.1 1.822 1.605 2.039
+
+Estimated disappearance times:
+      DT50 DT90 DT50back DT50_k1 DT50_k2
+DMTA 11.79 42.8    12.88   11.09   76.46
+
+
+

+ +Hierarchical mkin fit of the DFOP model with error model tc + +

+saemix version used for fitting:      3.2 
+mkin version used for pre-fitting:  1.2.2 
+R version used for fitting:         4.2.2 
+Date of fit:     Thu Jan  5 08:19:08 2023 
+Date of summary: Thu Jan  5 08:20:11 2023 
+
+Equations:
+d_DMTA/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
+           time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))
+           * DMTA
+
+Data:
+155 observations of 1 variable(s) grouped in 6 datasets
+
+Model predictions using solution type analytical 
+
+Fitted in 3.033 s
+Using 300, 100 iterations and 9 chains
+
+Variance model: Two-component variance function 
+
+Starting values for degradation parameters:
+   DMTA_0        k1        k2         g 
+98.759266  0.087034  0.009933  0.930827 
+
+Fixed degradation parameter values:
+None
+
+Starting values for random effects (square root of initial entries in omega):
+       DMTA_0 k1 k2 g
+DMTA_0  98.76  0  0 0
+k1       0.00  1  0 0
+k2       0.00  0  1 0
+g        0.00  0  0 1
+
+Starting values for error model parameters:
+a.1 b.1 
+  1   1 
+
+Results:
+
+Likelihood computed by importance sampling
+    AIC   BIC logLik
+  665.5 663.4 -322.8
+
+Optimised parameters:
+               est.     lower     upper
+DMTA_0    98.377019 96.447952 100.30609
+k1         0.064843  0.034607   0.09508
+k2         0.008895  0.006368   0.01142
+g          0.949696  0.903815   0.99558
+a.1        1.065241  0.865754   1.26473
+b.1        0.029340  0.022336   0.03634
+SD.DMTA_0  2.007754  0.387982   3.62753
+SD.k1      0.580473  0.250286   0.91066
+SD.k2      0.006105 -4.920337   4.93255
+SD.g       1.097149  0.412779   1.78152
+
+Correlation: 
+   DMTA_0  k1      k2     
+k1  0.0235                
+k2  0.0595  0.0424        
+g  -0.0470 -0.0278 -0.2731
+
+Random effects:
+              est.   lower  upper
+SD.DMTA_0 2.007754  0.3880 3.6275
+SD.k1     0.580473  0.2503 0.9107
+SD.k2     0.006105 -4.9203 4.9325
+SD.g      1.097149  0.4128 1.7815
+
+Variance model:
+       est.   lower   upper
+a.1 1.06524 0.86575 1.26473
+b.1 0.02934 0.02234 0.03634
+
+Estimated disappearance times:
+      DT50  DT90 DT50back DT50_k1 DT50_k2
+DMTA 11.36 41.32    12.44   10.69   77.92
+
+
+

+ +Hierarchical mkin fit of the HS model with error model const + +

+saemix version used for fitting:      3.2 
+mkin version used for pre-fitting:  1.2.2 
+R version used for fitting:         4.2.2 
+Date of fit:     Thu Jan  5 08:19:07 2023 
+Date of summary: Thu Jan  5 08:20:11 2023 
+
+Equations:
+d_DMTA/dt = - ifelse(time <= tb, k1, k2) * DMTA
+
+Data:
+155 observations of 1 variable(s) grouped in 6 datasets
+
+Model predictions using solution type analytical 
+
+Fitted in 2.004 s
+Using 300, 100 iterations and 9 chains
+
+Variance model: Constant variance 
+
+Starting values for degradation parameters:
+  DMTA_0       k1       k2       tb 
+97.82176  0.06931  0.02997 11.13945 
+
+Fixed degradation parameter values:
+None
+
+Starting values for random effects (square root of initial entries in omega):
+       DMTA_0 k1 k2 tb
+DMTA_0  97.82  0  0  0
+k1       0.00  1  0  0
+k2       0.00  0  1  0
+tb       0.00  0  0  1
+
+Starting values for error model parameters:
+a.1 
+  1 
+
+Results:
+
+Likelihood computed by importance sampling
+  AIC   BIC logLik
+  714 712.1   -348
+
+Optimised parameters:
+              est.    lower    upper
+DMTA_0    98.16102 96.47747 99.84456
+k1         0.07876  0.05261  0.10491
+k2         0.02227  0.01706  0.02747
+tb        13.99089 -7.40049 35.38228
+a.1        1.82305  1.60700  2.03910
+SD.DMTA_0  1.88413  0.56204  3.20622
+SD.k1      0.34292  0.10482  0.58102
+SD.k2      0.19851  0.01718  0.37985
+SD.tb      1.68168  0.58064  2.78272
+
+Correlation: 
+   DMTA_0  k1      k2     
+k1  0.0142                
+k2  0.0001 -0.0025        
+tb  0.0165 -0.1256 -0.0301
+
+Random effects:
+            est.   lower  upper
+SD.DMTA_0 1.8841 0.56204 3.2062
+SD.k1     0.3429 0.10482 0.5810
+SD.k2     0.1985 0.01718 0.3798
+SD.tb     1.6817 0.58064 2.7827
+
+Variance model:
+     est. lower upper
+a.1 1.823 1.607 2.039
+
+Estimated disappearance times:
+      DT50  DT90 DT50back DT50_k1 DT50_k2
+DMTA 8.801 67.91    20.44   8.801   31.13
+
+
+

+ +Hierarchical mkin fit of the HS model with error model tc + +

+saemix version used for fitting:      3.2 
+mkin version used for pre-fitting:  1.2.2 
+R version used for fitting:         4.2.2 
+Date of fit:     Thu Jan  5 08:19:08 2023 
+Date of summary: Thu Jan  5 08:20:11 2023 
+
+Equations:
+d_DMTA/dt = - ifelse(time <= tb, k1, k2) * DMTA
+
+Data:
+155 observations of 1 variable(s) grouped in 6 datasets
+
+Model predictions using solution type analytical 
+
+Fitted in 3.287 s
+Using 300, 100 iterations and 9 chains
+
+Variance model: Two-component variance function 
+
+Starting values for degradation parameters:
+  DMTA_0       k1       k2       tb 
+98.45190  0.07525  0.02576 19.19375 
+
+Fixed degradation parameter values:
+None
+
+Starting values for random effects (square root of initial entries in omega):
+       DMTA_0 k1 k2 tb
+DMTA_0  98.45  0  0  0
+k1       0.00  1  0  0
+k2       0.00  0  1  0
+tb       0.00  0  0  1
+
+Starting values for error model parameters:
+a.1 b.1 
+  1   1 
+
+Results:
+
+Likelihood computed by importance sampling
+    AIC BIC logLik
+  667.1 665 -323.6
+
+Optimised parameters:
+              est.    lower    upper
+DMTA_0    97.76570 95.81350 99.71791
+k1         0.05855  0.03080  0.08630
+k2         0.02337  0.01664  0.03010
+tb        31.09638 29.38289 32.80987
+a.1        1.08835  0.88590  1.29080
+b.1        0.02964  0.02257  0.03671
+SD.DMTA_0  2.04877  0.42607  3.67147
+SD.k1      0.59166  0.25621  0.92711
+SD.k2      0.30698  0.09561  0.51835
+SD.tb      0.01274 -0.10914  0.13462
+
+Correlation: 
+   DMTA_0  k1      k2     
+k1  0.0160                
+k2 -0.0070 -0.0024        
+tb -0.0668 -0.0103 -0.2013
+
+Random effects:
+             est.    lower  upper
+SD.DMTA_0 2.04877  0.42607 3.6715
+SD.k1     0.59166  0.25621 0.9271
+SD.k2     0.30698  0.09561 0.5183
+SD.tb     0.01274 -0.10914 0.1346
+
+Variance model:
+       est.   lower   upper
+a.1 1.08835 0.88590 1.29080
+b.1 0.02964 0.02257 0.03671
+
+Estimated disappearance times:
+      DT50  DT90 DT50back DT50_k1 DT50_k2
+DMTA 11.84 51.71    15.57   11.84   29.66
+
+
+

+
+
+

Hierarchical model convergence plots +

+
+Convergence plot for the NLHM SFO fit with constant variance

+Convergence plot for the NLHM SFO fit with constant variance +

+
+
+Convergence plot for the NLHM SFO fit with two-component error

+Convergence plot for the NLHM SFO fit with two-component error +

+
+
+Convergence plot for the NLHM FOMC fit with constant variance

+Convergence plot for the NLHM FOMC fit with constant variance +

+
+
+Convergence plot for the NLHM FOMC fit with two-component error

+Convergence plot for the NLHM FOMC fit with two-component error +

+
+
+Convergence plot for the NLHM DFOP fit with constant variance

+Convergence plot for the NLHM DFOP fit with constant variance +

+
+
+Convergence plot for the NLHM DFOP fit with two-component error

+Convergence plot for the NLHM DFOP fit with two-component error +

+
+
+Convergence plot for the NLHM HS fit with constant variance

+Convergence plot for the NLHM HS fit with constant variance +

+
+
+Convergence plot for the NLHM HS fit with two-component error

+Convergence plot for the NLHM HS fit with two-component error +

+
+
+
+

Session info +

+
R version 4.2.2 Patched (2022-11-10 r83330)
+Platform: x86_64-pc-linux-gnu (64-bit)
+Running under: Debian GNU/Linux bookworm/sid
+
+Matrix products: default
+BLAS:   /usr/lib/x86_64-linux-gnu/openblas-serial/libblas.so.3
+LAPACK: /usr/lib/x86_64-linux-gnu/openblas-serial/libopenblas-r0.3.21.so
+
+locale:
+ [1] LC_CTYPE=de_DE.UTF-8       LC_NUMERIC=C              
+ [3] LC_TIME=de_DE.UTF-8        LC_COLLATE=de_DE.UTF-8    
+ [5] LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=de_DE.UTF-8   
+ [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                 
+ [9] LC_ADDRESS=C               LC_TELEPHONE=C            
+[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       
+
+attached base packages:
+[1] parallel  stats     graphics  grDevices utils     datasets  methods  
+[8] base     
+
+other attached packages:
+[1] saemix_3.2 npde_3.3   knitr_1.41 mkin_1.2.2
+
+loaded via a namespace (and not attached):
+ [1] deSolve_1.34      zoo_1.8-11        tidyselect_1.2.0  xfun_0.35        
+ [5] bslib_0.4.2       purrr_1.0.0       lattice_0.20-45   colorspace_2.0-3 
+ [9] vctrs_0.5.1       generics_0.1.3    htmltools_0.5.4   yaml_2.3.6       
+[13] utf8_1.2.2        rlang_1.0.6       pkgdown_2.0.7     jquerylib_0.1.4  
+[17] pillar_1.8.1      glue_1.6.2        DBI_1.1.3         lifecycle_1.0.3  
+[21] stringr_1.5.0     munsell_0.5.0     gtable_0.3.1      ragg_1.2.4       
+[25] codetools_0.2-18  memoise_2.0.1     evaluate_0.19     fastmap_1.1.0    
+[29] lmtest_0.9-40     fansi_1.0.3       highr_0.9         scales_1.2.1     
+[33] cachem_1.0.6      desc_1.4.2        jsonlite_1.8.4    systemfonts_1.0.4
+[37] fs_1.5.2          textshaping_0.3.6 gridExtra_2.3     ggplot2_3.4.0    
+[41] digest_0.6.31     stringi_1.7.8     dplyr_1.0.10      grid_4.2.2       
+[45] rprojroot_2.0.3   cli_3.5.0         tools_4.2.2       magrittr_2.0.3   
+[49] sass_0.4.4        tibble_3.1.8      pkgconfig_2.0.3   assertthat_0.2.1 
+[53] rmarkdown_2.19    R6_2.5.1          mclust_6.0.0      nlme_3.1-161     
+[57] compiler_4.2.2   
+
+
+
+ + + +
+ + + +
+ +
+

+

Site built with pkgdown 2.0.7.

+
+ +
+
+ + + + + + + + diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-const-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-const-1.png new file mode 100644 index 00000000..4f87b956 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-const-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-tc-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-tc-1.png new file mode 100644 index 00000000..58825300 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-tc-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-tc-no-ranef-k2-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-tc-no-ranef-k2-1.png new file mode 100644 index 00000000..17defde1 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-dfop-tc-no-ranef-k2-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-fomc-const-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-fomc-const-1.png new file mode 100644 index 00000000..b802acc6 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-fomc-const-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-fomc-tc-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-fomc-tc-1.png new file mode 100644 index 00000000..2d6427d5 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-fomc-tc-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-hs-const-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-hs-const-1.png new file mode 100644 index 00000000..f15137d0 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-hs-const-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-hs-tc-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-hs-tc-1.png new file mode 100644 index 00000000..322668f0 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-hs-tc-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-sfo-const-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-sfo-const-1.png new file mode 100644 index 00000000..4ceb281f Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-sfo-const-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-sfo-tc-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-sfo-tc-1.png new file mode 100644 index 00000000..07383871 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/convergence-saem-sfo-tc-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-full-par-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-full-par-1.png new file mode 100644 index 00000000..cf4b058e Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-full-par-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-reduced-par-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-reduced-par-1.png new file mode 100644 index 00000000..d9ed8685 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-reduced-par-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-reduced-par-llquant-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-reduced-par-llquant-1.png new file mode 100644 index 00000000..45dd7eb4 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/multistart-reduced-par-llquant-1.png differ diff --git a/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/plot-saem-dfop-tc-no-ranef-k2-1.png b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/plot-saem-dfop-tc-no-ranef-k2-1.png new file mode 100644 index 00000000..5a3bd434 Binary files /dev/null and b/docs/dev/articles/2022_wp_1.1_dmta_parent_files/figure-html/plot-saem-dfop-tc-no-ranef-k2-1.png differ diff --git a/docs/dev/articles/index.html b/docs/dev/articles/index.html index e04302ef..cd0e315f 100644 --- a/docs/dev/articles/index.html +++ b/docs/dev/articles/index.html @@ -90,7 +90,9 @@

All vignettes

-
Example evaluation of FOCUS Example Dataset D
+
Work package 1.1: Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P
+
+
Example evaluation of FOCUS Example Dataset D
Example evaluation of FOCUS Laboratory Data L1 to L3
@@ -122,7 +124,7 @@
-

Site built with pkgdown 2.0.6.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/dev/authors.html b/docs/dev/authors.html index bd58bc3d..165e2400 100644 --- a/docs/dev/authors.html +++ b/docs/dev/authors.html @@ -113,14 +113,14 @@ -

Ranke J (2022). +

Ranke J (2023). mkin: Kinetic Evaluation of Chemical Degradation Data. R package version 1.2.2, https://pkgdown.jrwb.de/mkin/.

@Manual{,
   title = {mkin: Kinetic Evaluation of Chemical Degradation Data},
   author = {Johannes Ranke},
-  year = {2022},
+  year = {2023},
   note = {R package version 1.2.2},
   url = {https://pkgdown.jrwb.de/mkin/},
 }
@@ -136,7 +136,7 @@ R package version 1.2.2, https://pkgdown
-

Site built with pkgdown 2.0.6.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/dev/index.html b/docs/dev/index.html index 4723879e..993b8eea 100644 --- a/docs/dev/index.html +++ b/docs/dev/index.html @@ -19,11 +19,11 @@ equation models are solved using automatically generated C functions. Heteroscedasticity can be taken into account using variance by variable or two-component error models as described by Ranke and Meinecke (2018) - <doi:10.3390/environments6120124>. Interfaces to several nonlinear - mixed-effects model packages are available, some of which are described by - Ranke et al. (2021) <doi:10.3390/environments8080071>. Please note that no - warranty is implied for correctness of results or fitness for a particular - purpose."> + <doi:10.3390/environments6120124>. Hierarchical degradation models can + be fitted using nonlinear mixed-effects model packages as a backend as + described by Ranke et al. (2021) <doi:10.3390/environments8080071>. Please + note that no warranty is implied for correctness of results or fitness for a + particular purpose."> Hierarchical kinetics template — hierarchical_kinetics • mkin + + +
+
+ + + +
+
+ + +
+

R markdown format for setting up hierarchical kinetics based on a template +provided with the mkin package.

+
+ +
+
hierarchical_kinetics(..., keep_tex = FALSE)
+
+ +
+

Arguments

+
...
+

Arguments to rmarkdown::pdf_document

+ + +
keep_tex
+

Keep the intermediate tex file used in the conversion to PDF

+ +
+
+

Value

+ + +

R Markdown output format to pass to +render

+ + +
+ +
+

Examples

+

+# \dontrun{
+library(rmarkdown)
+draft("example_analysis.rmd", template = "hierarchical_kinetics", package = "mkin")
+# }
+
+
+
+
+ +
+ + +
+ +
+

Site built with pkgdown 2.0.7.

+
+ +
+ + + + + + + + diff --git a/docs/dev/reference/index.html b/docs/dev/reference/index.html index 794126cf..525551fd 100644 --- a/docs/dev/reference/index.html +++ b/docs/dev/reference/index.html @@ -195,6 +195,10 @@ of an mmkin object

Create and work with nonlinear hierarchical models

+

hierarchical_kinetics()

+ +

Hierarchical kinetics template

+

read_spreadsheet()

Read datasets and relevant meta information from a spreadsheet file

@@ -356,9 +360,9 @@ degradation models and one or more error models

-

tex_listing()

+

summary_listing() tex_listing() html_listing()

-

Wrap the output of a summary function in tex listing environment

+

Display the output of a summary function according to the output format

f_time_norm_focus()

@@ -493,7 +497,7 @@ kinetic models fitted with mkinfit

-

Site built with pkgdown 2.0.6.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/dev/reference/mkinmod.html b/docs/dev/reference/mkinmod.html index 251215a7..145dee83 100644 --- a/docs/dev/reference/mkinmod.html +++ b/docs/dev/reference/mkinmod.html @@ -132,7 +132,7 @@ the source compartment. Additionally, mkinsub() has an argument to, specifying names of variables to which a transfer is to be assumed in the model. If the argument use_of_ff is set to "min" -(default) and the model for the compartment is "SFO" or "SFORB", an +and the model for the compartment is "SFO" or "SFORB", an additional mkinsub() argument can be sink = FALSE, effectively fixing the flux to sink to zero. In print.mkinmod, this argument is currently not used.

@@ -247,7 +247,7 @@ in the FOCUS and NAFTA guidance documents are used.

For kinetic models with more than one observed variable, a symbolic solution of the system of differential equations is included in the resulting mkinmod object in some cases, speeding up the solution.

-

If a C compiler is found by pkgbuild::has_compiler() and there +

If a C compiler is found by pkgbuild::has_compiler() and there is more than one observed variable in the specification, C code is generated for evaluating the differential equations, compiled using inline::cfunction() and added to the resulting mkinmod object.

@@ -310,7 +310,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media

parent = mkinsub("SFO", "m1", full_name = "Test compound"), m1 = mkinsub("SFO", full_name = "Metabolite M1"), name = "SFO_SFO", dll_dir = DLL_dir, unload = TRUE, overwrite = TRUE) -#> Copied DLL from /tmp/RtmpbZbZ8Y/file8c6a9f402f42.so to /home/jranke/.local/share/mkin/SFO_SFO.so +#> Copied DLL from /tmp/RtmpelWAOB/fileb43c31a25a86.so to /home/jranke/.local/share/mkin/SFO_SFO.so # Now we can save the model and restore it in a new session saveRDS(SFO_SFO.2, file = "~/SFO_SFO.rds") # Terminate the R session here if you would like to check, and then do @@ -363,7 +363,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media

#> }) #> return(predicted) #> } -#> <environment: 0x55556029f678> +#> <environment: 0x55555f013820> # If we have several parallel metabolites # (compare tests/testthat/test_synthetic_data_for_UBA_2014.R) @@ -392,7 +392,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media

-

Site built with pkgdown 2.0.6.

+

Site built with pkgdown 2.0.7.

diff --git a/docs/dev/reference/summary_listing.html b/docs/dev/reference/summary_listing.html new file mode 100644 index 00000000..876412cc --- /dev/null +++ b/docs/dev/reference/summary_listing.html @@ -0,0 +1,147 @@ + +Display the output of a summary function according to the output format — summary_listing • mkin + + +
+
+ + + +
+
+ + +
+

This function is intended for use in a R markdown code chunk with the chunk +option results = "asis".

+
+ +
+
summary_listing(object, caption = NULL, label = NULL, clearpage = TRUE)
+
+tex_listing(object, caption = NULL, label = NULL, clearpage = TRUE)
+
+html_listing(object, caption = NULL)
+
+ +
+

Arguments

+
object
+

The object for which the summary is to be listed

+ + +
caption
+

An optional caption

+ + +
label
+

An optional label, ignored in html output

+ + +
clearpage
+

Should a new page be started after the listing? Ignored in html output

+ +
+ +
+ +
+ + +
+ +
+

Site built with pkgdown 2.0.7.

+
+ +
+ + + + + + + + diff --git a/docs/dev/sitemap.xml b/docs/dev/sitemap.xml index 06f56c5d..6e51371c 100644 --- a/docs/dev/sitemap.xml +++ b/docs/dev/sitemap.xml @@ -3,6 +3,9 @@ https://pkgdown.jrwb.de/mkin/404.html + + https://pkgdown.jrwb.de/mkin/articles/2022_wp_1.1_dmta_parent.html + https://pkgdown.jrwb.de/mkin/articles/FOCUS_D.html @@ -138,6 +141,9 @@ https://pkgdown.jrwb.de/mkin/reference/get_deg_func.html + + https://pkgdown.jrwb.de/mkin/reference/hierarchical_kinetics.html + https://pkgdown.jrwb.de/mkin/reference/illparms.html @@ -306,6 +312,9 @@ https://pkgdown.jrwb.de/mkin/reference/summary.saem.mmkin.html + + https://pkgdown.jrwb.de/mkin/reference/summary_listing.html + https://pkgdown.jrwb.de/mkin/reference/synthetic_data_for_UBA_2014.html diff --git a/inst/testdata/cyantraniliprole_soil_efsa_2014.xlsx b/inst/testdata/cyantraniliprole_soil_efsa_2014.xlsx new file mode 100644 index 00000000..3252fdf1 Binary files /dev/null and b/inst/testdata/cyantraniliprole_soil_efsa_2014.xlsx differ diff --git a/log/check.log b/log/check.log index aec61e33..a81475d9 100644 --- a/log/check.log +++ b/log/check.log @@ -7,11 +7,28 @@ * checking extension type ... Package * this is package ‘mkin’ version ‘1.2.2’ * package encoding: UTF-8 -* checking CRAN incoming feasibility ... Note_to_CRAN_maintainers +* checking CRAN incoming feasibility ... NOTE Maintainer: ‘Johannes Ranke ’ + +Size of tarball: 6636884 bytes * checking package namespace information ... OK * checking package dependencies ... OK -* checking if this is a source package ... OK +* checking if this is a source package ... NOTE +Found the following apparent object files/libraries: + vignettes/2022_wp_1/cyan_dlls/dfop_path_1.so + vignettes/2022_wp_1/cyan_dlls/dfop_path_2.so + vignettes/2022_wp_1/cyan_dlls/fomc_path_1.so + vignettes/2022_wp_1/cyan_dlls/fomc_path_2.so + vignettes/2022_wp_1/cyan_dlls/hs_path_1.so + vignettes/2022_wp_1/cyan_dlls/sfo_path_1.so + vignettes/2022_wp_1/cyan_dlls/sforb_path_1.so + vignettes/2022_wp_1/cyan_dlls/sforb_path_2.so + vignettes/2022_wp_1/dmta_dlls/m_dfop_path.so + vignettes/2022_wp_1/dmta_dlls/m_fomc_path.so + vignettes/2022_wp_1/dmta_dlls/m_hs_path.so + vignettes/2022_wp_1/dmta_dlls/m_sfo_path.so + vignettes/2022_wp_1/dmta_dlls/m_sforb_path.so +Object files/libraries should not be included in a source package. * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK @@ -41,14 +58,7 @@ Maintainer: ‘Johannes Ranke ’ * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK -* checking R code for possible problems ... NOTE -parplot.multistart.saem.mmkin: no visible global function definition - for ‘quantile’ -Undefined global functions or variables: - quantile -Consider adding - importFrom("stats", "quantile") -to your NAMESPACE file. +* checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK @@ -64,7 +74,7 @@ to your NAMESPACE file. * checking data for ASCII and uncompressed saves ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK -* checking examples ... [11s/11s] OK +* checking examples ... [10s/10s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... SKIPPED * checking for unstated dependencies in vignettes ... OK @@ -76,7 +86,7 @@ to your NAMESPACE file. * checking for detritus in the temp directory ... OK * DONE -Status: 1 NOTE +Status: 2 NOTEs See ‘/home/jranke/git/mkin/mkin.Rcheck/00check.log’ for details. diff --git a/man/hierarchical_kinetics.Rd b/man/hierarchical_kinetics.Rd index 4bb82a4c..2a8e211c 100644 --- a/man/hierarchical_kinetics.Rd +++ b/man/hierarchical_kinetics.Rd @@ -23,7 +23,7 @@ provided with the mkin package. \dontrun{ library(rmarkdown) -draft("New analysis.rmd", template = "hierarchical_kinetics", package = "mkin") +draft("example_analysis.rmd", template = "hierarchical_kinetics", package = "mkin") } } diff --git a/man/mkinmod.Rd b/man/mkinmod.Rd index 87ce9016..65b5de1a 100644 --- a/man/mkinmod.Rd +++ b/man/mkinmod.Rd @@ -33,7 +33,7 @@ the source compartment. Additionally, \code{\link[=mkinsub]{mkinsub()}} has an argument \code{to}, specifying names of variables to which a transfer is to be assumed in the model. If the argument \code{use_of_ff} is set to "min" -(default) and the model for the compartment is "SFO" or "SFORB", an +and the model for the compartment is "SFO" or "SFORB", an additional \code{\link[=mkinsub]{mkinsub()}} argument can be \code{sink = FALSE}, effectively fixing the flux to sink to zero. In print.mkinmod, this argument is currently not used.} diff --git a/man/summary_listing.Rd b/man/summary_listing.Rd new file mode 100644 index 00000000..995ebd8d --- /dev/null +++ b/man/summary_listing.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/summary_listing.R +\name{summary_listing} +\alias{summary_listing} +\alias{tex_listing} +\alias{html_listing} +\title{Display the output of a summary function according to the output format} +\usage{ +summary_listing(object, caption = NULL, label = NULL, clearpage = TRUE) + +tex_listing(object, caption = NULL, label = NULL, clearpage = TRUE) + +html_listing(object, caption = NULL) +} +\arguments{ +\item{object}{The object for which the summary is to be listed} + +\item{caption}{An optional caption} + +\item{label}{An optional label, ignored in html output} + +\item{clearpage}{Should a new page be started after the listing? Ignored in html output} +} +\description{ +This function is intended for use in a R markdown code chunk with the chunk +option \code{results = "asis"}. +} diff --git a/man/tex_listing.Rd b/man/tex_listing.Rd deleted file mode 100644 index 2f11d211..00000000 --- a/man/tex_listing.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/tex_listing.R -\name{tex_listing} -\alias{tex_listing} -\title{Wrap the output of a summary function in tex listing environment} -\usage{ -tex_listing(object, caption = NULL, label = NULL, clearpage = TRUE) -} -\arguments{ -\item{object}{The object for which the summary is to be listed} - -\item{caption}{An optional caption} - -\item{label}{An optional label} - -\item{clearpage}{Should a new page be started after the listing?} -} -\description{ -This function can be used in a R markdown code chunk with the chunk -option \code{results = "asis"}. -} diff --git a/vignettes/FOCUS_D.html b/vignettes/FOCUS_D.html index b8a63a7b..c729e3c2 100644 --- a/vignettes/FOCUS_D.html +++ b/vignettes/FOCUS_D.html @@ -31,7 +31,7 @@ document.addEventListener('DOMContentLoaded', function(e) { !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 - - - - + + @@ -1874,6 +1947,9 @@ $(document).ready(function () { - + - + - + code{white-space: pre-wrap;} + span.smallcaps{font-variant: small-caps;} + span.underline{text-decoration: underline;} + div.column{display: inline-block; vertical-align: top; width: 50%;} + div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} + ul.task-list{list-style: none;} + + + @@ -1711,6 +1748,9 @@ $(document).ready(function () { -