diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-04-18 00:38:26 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-04-18 00:38:26 +0200 |
commit | 518a801a9a0f1aef36df1f201b6a3f0f3a84b779 (patch) | |
tree | 0e3bcbdc0f50df02c4249f49d52c65bd2537ed4b | |
parent | 49ecddeab52babb7388990b5dd0e15acd70c8b43 (diff) |
Avoid assignment to .GlobalEnv for CRAN
-rw-r--r-- | NAMESPACE | 2 | ||||
-rw-r--r-- | R/nlme.mmkin.R | 35 | ||||
-rw-r--r-- | R/summary.mkinfit.R | 12 | ||||
-rw-r--r-- | _pkgdown.yml | 1 | ||||
-rw-r--r-- | check.log | 28 | ||||
-rw-r--r-- | docs/reference/get_deg_func.html | 176 | ||||
-rw-r--r-- | docs/reference/index.html | 6 | ||||
-rw-r--r-- | docs/reference/nlme.mmkin.html | 12 | ||||
-rw-r--r-- | docs/sitemap.xml | 3 | ||||
-rw-r--r-- | man/get_deg_func.Rd | 15 | ||||
-rw-r--r-- | man/nlme.mmkin.Rd | 4 | ||||
-rw-r--r-- | test.log | 16 | ||||
-rw-r--r-- | tests/testthat/FOCUS_2006_D.csf | 2 | ||||
-rw-r--r-- | tests/testthat/summary_DFOP_FOCUS_C.txt | 5 | ||||
-rw-r--r-- | tests/testthat/summary_DFOP_FOCUS_D_deSolve.txt | 5 | ||||
-rw-r--r-- | tests/testthat/summary_DFOP_FOCUS_D_eigen.txt | 5 |
16 files changed, 271 insertions, 56 deletions
@@ -40,6 +40,7 @@ export(add_err) export(aw) export(backtransform_odeparms) export(endpoints) +export(get_deg_func) export(ilr) export(invilr) export(loftest) @@ -109,4 +110,5 @@ importFrom(stats,qt) importFrom(stats,residuals) importFrom(stats,rnorm) importFrom(stats,update) +importFrom(utils,getFromNamespace) importFrom(utils,write.table) diff --git a/R/nlme.mmkin.R b/R/nlme.mmkin.R index 1d6c2e75..e58f11cb 100644 --- a/R/nlme.mmkin.R +++ b/R/nlme.mmkin.R @@ -1,3 +1,21 @@ +# Code inspired by nlme::nlme.nlsList and R/nlme_fit.R from nlmixr + +# We need to assign the degradation function created in nlme.mmkin to an +# environment that is always accessible, also e.g. when evaluation is done by +# testthat or pkgdown. Therefore parent.frame() is not good enough. The +# following environment will be in the mkin namespace. +.nlme_env <- new.env(parent = emptyenv()) + +#' Retrieve a degradation function from the mmkin namespace +#' +#' @importFrom utils getFromNamespace +#' @return A function that was likely previously assigned from within +#' nlme.mmkin +#' @export +get_deg_func <- function() { + return(get("deg_func", getFromNamespace(".nlme_env", "mkin"))) +} + #' Create an nlme model for an mmkin row object #' #' This functions sets up a nonlinear mixed effects model for an mmkin row @@ -35,9 +53,9 @@ #' f_nlme <- nlme(f) #' print(f_nlme) #' endpoints(f_nlme) -#' f_nlme_2 <- nlme(f, start = c(parent_0 = 100, log_k_parent_sink = 0.1)) -#' update(f_nlme_2, random = parent_0 ~ 1) #' \dontrun{ +#' f_nlme_2 <- nlme(f, start = c(parent_0 = 100, log_k_parent_sink = 0.1)) +#' update(f_nlme_2, random = parent_0 ~ 1) #' # Test on some real data #' ds_2 <- lapply(experimental_data_for_UBA_2019[6:10], #' function(x) x$data[c("name", "time", "value")]) @@ -83,7 +101,6 @@ #' endpoints(f_nlme_sfo_sfo) #' endpoints(f_nlme_dfop_sfo) #' } -# Code inspired by nlme.nlsList nlme.mmkin <- function(model, data = sys.frame(sys.parent()), fixed, random = fixed, groups, start, correlation = NULL, weights = NULL, @@ -95,19 +112,21 @@ nlme.mmkin <- function(model, data = sys.frame(sys.parent()), thisCall <- as.list(match.call())[-1] - # warn in case of use of arguments that are overriden + # Warn in case arguments were used that are overriden if (any(!is.na(match(names(thisCall), c("fixed", "data"))))) { warning("'nlme.mmkin' will redefine 'fixed' and 'data'") } deg_func <- nlme_function(model) - assign("deg_func", deg_func, globalenv()) - # specify the model formula - this_model_text <- paste0("value ~ deg_func(", + assign("deg_func", deg_func, getFromNamespace(".nlme_env", "mkin")) + + # For the formula, get the degradation function from the mkin namespace + this_model_text <- paste0("value ~ mkin::get_deg_func()(", paste(names(formals(deg_func)), collapse = ", "), ")") - this_model <- eval(parse(text = this_model_text)) + this_model <- as.formula(this_model_text) + thisCall[["model"]] <- this_model mean_dp <- mean_degparms(model) diff --git a/R/summary.mkinfit.R b/R/summary.mkinfit.R index a67f17ee..2dc74bd7 100644 --- a/R/summary.mkinfit.R +++ b/R/summary.mkinfit.R @@ -138,13 +138,11 @@ summary.mkinfit <- function(object, data = TRUE, distimes = TRUE, alpha = 0.05, if (!is.null(object$version)) { ans$fit_version <- object$version ans$fit_Rversion <- object$Rversion - } - - AIC <- try(AIC(object)) - if (!inherits(AIC, "try-error")) { - ans$AIC = AIC(object) - ans$BIC = BIC(object) - ans$logLik = logLik(object) + if (ans$fit_version >= "0.9.49.6") { + ans$AIC = AIC(object) + ans$BIC = BIC(object) + ans$logLik = logLik(object) + } } ans$diffs <- object$mkinmod$diffs diff --git a/_pkgdown.yml b/_pkgdown.yml index 2ede6857..0623c6ed 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -39,6 +39,7 @@ reference: - nlme.mmkin - plot.nlme.mmkin - nlme_function + - get_deg_func - title: Datasets and known results contents: - FOCUS_2006_A @@ -41,12 +41,28 @@ Maintainer: ‘Johannes Ranke <jranke@uni-bremen.de>’ * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK -* checking R code for possible problems ... OK +* checking R code for possible problems ... NOTE +get_deg_func: no visible global function definition for + ‘getFromNamespace’ +nlme.mmkin: no visible global function definition for + ‘getFromNamespace’ +nlme.mmkin: no visible global function definition for ‘as.formula’ +Undefined global functions or variables: + as.formula getFromNamespace +Consider adding + importFrom("stats", "as.formula") + importFrom("utils", "getFromNamespace") +to your NAMESPACE file. * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK -* checking for missing documentation entries ... OK +* checking for missing documentation entries ... WARNING +Undocumented code objects: + ‘get_deg_func’ +All user-level objects in a package should have documentation entries. +See chapter ‘Writing R documentation files’ in the ‘Writing R +Extensions’ manual. * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK @@ -56,11 +72,7 @@ Maintainer: ‘Johannes Ranke <jranke@uni-bremen.de>’ * checking data for ASCII and uncompressed saves ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK -* checking examples ... NOTE -Examples with CPU or elapsed time > 5s - user system elapsed -nlme.mmkin 4.801 1.040 4.497 -plot.nlme.mmkin 4.751 0.285 4.680 +* checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... SKIPPED * checking for unstated dependencies in vignettes ... OK @@ -70,7 +82,7 @@ plot.nlme.mmkin 4.751 0.285 4.680 * checking for detritus in the temp directory ... OK * DONE -Status: 1 NOTE +Status: 1 WARNING, 1 NOTE See ‘/home/jranke/git/mkin/mkin.Rcheck/00check.log’ for details. diff --git a/docs/reference/get_deg_func.html b/docs/reference/get_deg_func.html new file mode 100644 index 00000000..c5b8e38c --- /dev/null +++ b/docs/reference/get_deg_func.html @@ -0,0 +1,176 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> + +<title>Retrieve a degradation function from the mmkin namespace — get_deg_func • mkin</title> + + +<!-- jquery --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> +<!-- Bootstrap --> + +<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" /> + +<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" /> +<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" /> + +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script> + +<!-- headroom.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + + + + +<meta property="og:title" content="Retrieve a degradation function from the mmkin namespace — get_deg_func" /> +<meta property="og:description" content="Retrieve a degradation function from the mmkin namespace" /> +<meta name="twitter:card" content="summary" /> + + + + +<!-- mathjax --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script> + +<!--[if lt IE 9]> +<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> +<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> +<![endif]--> + + + + </head> + + <body> + <div class="container template-reference-topic"> + <header> + <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <span class="navbar-brand"> + <a class="navbar-link" href="../index.html">mkin</a> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.49.10</span> + </span> + </div> + + <div id="navbar" class="navbar-collapse collapse"> + <ul class="nav navbar-nav"> + <li> + <a href="../reference/index.html">Functions and data</a> +</li> +<li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> + Articles + + <span class="caret"></span> + </a> + <ul class="dropdown-menu" role="menu"> + <li> + <a href="../articles/mkin.html">Introduction to mkin</a> + </li> + <li> + <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a> + </li> + <li> + <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> + </li> + <li> + <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> + <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> + </li> + <li> + <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a> + </li> + <li> + <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> + </li> + </ul> +</li> +<li> + <a href="../news/index.html">News</a> +</li> + </ul> + <ul class="nav navbar-nav navbar-right"> + + </ul> + + </div><!--/.nav-collapse --> + </div><!--/.container --> +</div><!--/.navbar --> + + + + </header> + +<div class="row"> + <div class="col-md-9 contents"> + <div class="page-header"> + <h1>Retrieve a degradation function from the mmkin namespace</h1> + + <div class="hidden name"><code>get_deg_func.Rd</code></div> + </div> + + <div class="ref-description"> + <p>Retrieve a degradation function from the mmkin namespace</p> + </div> + + <pre class="usage"><span class='fu'>get_deg_func</span>()</pre> + + + <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> + + <p>A function that was likely previously assigned from within + nlme.mmkin</p> + + </div> + <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> + <h2>Contents</h2> + <ul class="nav nav-pills nav-stacked"> + <li><a href="#value">Value</a></li> + </ul> + + </div> +</div> + + + <footer> + <div class="copyright"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown"> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p> +</div> + + </footer> + </div> + + + + + </body> +</html> + + diff --git a/docs/reference/index.html b/docs/reference/index.html index f4de5bd8..04e3b8b9 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -296,6 +296,12 @@ of an mmkin object</p></td> <p><code><a href="nlme.html">nlme_function()</a></code> <code><a href="nlme.html">mean_degparms()</a></code> <code><a href="nlme.html">nlme_data()</a></code> </p> </td> <td><p>Helper functions to create nlme models from mmkin row objects</p></td> + </tr><tr> + + <td> + <p><code><a href="get_deg_func.html">get_deg_func()</a></code> </p> + </td> + <td><p>Retrieve a degradation function from the mmkin namespace</p></td> </tr> </tbody><tbody> <tr> diff --git a/docs/reference/nlme.mmkin.html b/docs/reference/nlme.mmkin.html index 9af9cbf7..33cc9164 100644 --- a/docs/reference/nlme.mmkin.html +++ b/docs/reference/nlme.mmkin.html @@ -258,7 +258,7 @@ parameters taken from the mmkin object are used</p></td> #> parent 11.96183 39.73634 #> </div><div class='input'><span class='no'>f_nlme</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>) <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>f_nlme</span>)</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood -#> Model: value ~ deg_func(name, time, parent_0, log_k_parent_sink) +#> Model: value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent_sink) #> Data: "Not shown" #> Log-likelihood: -307.5269 #> Fixed: list(parent_0 ~ 1, log_k_parent_sink ~ 1) @@ -276,9 +276,10 @@ parameters taken from the mmkin object are used</p></td> #> Number of Groups: 5 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme</span>)</div><div class='output co'>#> $distimes #> DT50 DT90 #> parent 17.51545 58.18505 -#> </div><div class='input'><span class='no'>f_nlme_2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>, <span class='kw'>start</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent_0</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>log_k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>)) -<span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>f_nlme_2</span>, <span class='kw'>random</span> <span class='kw'>=</span> <span class='no'>parent_0</span> ~ <span class='fl'>1</span>)</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood -#> Model: value ~ deg_func(name, time, parent_0, log_k_parent_sink) +#> </div><div class='input'><span class='co'># \dontrun{</span> + <span class='no'>f_nlme_2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>, <span class='kw'>start</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent_0</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>log_k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>)) + <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>f_nlme_2</span>, <span class='kw'>random</span> <span class='kw'>=</span> <span class='no'>parent_0</span> ~ <span class='fl'>1</span>)</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood +#> Model: value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent_sink) #> Data: "Not shown" #> Log-likelihood: -404.3729 #> Fixed: list(parent_0 ~ 1, log_k_parent_sink ~ 1) @@ -291,8 +292,7 @@ parameters taken from the mmkin object are used</p></td> #> StdDev: 0.002416792 21.63027 #> #> Number of Observations: 90 -#> Number of Groups: 5 </div><div class='input'><span class='co'># \dontrun{</span> - <span class='co'># Test on some real data</span> +#> Number of Groups: 5 </div><div class='input'> <span class='co'># Test on some real data</span> <span class='no'>ds_2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>], <span class='kw'>function</span>(<span class='no'>x</span>) <span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)]) <span class='no'>m_sfo_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"A1"</span>), diff --git a/docs/sitemap.xml b/docs/sitemap.xml index d1c86707..5abcc894 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -67,6 +67,9 @@ <loc>https://pkgdown.jrwb.de/mkin/reference/experimental_data_for_UBA.html</loc> </url> <url> + <loc>https://pkgdown.jrwb.de/mkin/reference/get_deg_func.html</loc> + </url> + <url> <loc>https://pkgdown.jrwb.de/mkin/reference/ilr.html</loc> </url> <url> diff --git a/man/get_deg_func.Rd b/man/get_deg_func.Rd new file mode 100644 index 00000000..1d8a3de9 --- /dev/null +++ b/man/get_deg_func.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/nlme.mmkin.R +\name{get_deg_func} +\alias{get_deg_func} +\title{Retrieve a degradation function from the mmkin namespace} +\usage{ +get_deg_func() +} +\value{ +A function that was likely previously assigned from within + nlme.mmkin +} +\description{ +Retrieve a degradation function from the mmkin namespace +} diff --git a/man/nlme.mmkin.Rd b/man/nlme.mmkin.Rd index 97d444e4..430dbda1 100644 --- a/man/nlme.mmkin.Rd +++ b/man/nlme.mmkin.Rd @@ -83,9 +83,9 @@ endpoints(f[[1]]) f_nlme <- nlme(f) print(f_nlme) endpoints(f_nlme) -f_nlme_2 <- nlme(f, start = c(parent_0 = 100, log_k_parent_sink = 0.1)) -update(f_nlme_2, random = parent_0 ~ 1) \dontrun{ + f_nlme_2 <- nlme(f, start = c(parent_0 = 100, log_k_parent_sink = 0.1)) + update(f_nlme_2, random = parent_0 ~ 1) # Test on some real data ds_2 <- lapply(experimental_data_for_UBA_2019[6:10], function(x) x$data[c("name", "time", "value")]) @@ -7,29 +7,27 @@ Testing mkin ✔ | 4 | Fitting the SFORB model [1.7 s] ✔ | 5 | Calculation of Akaike weights ✔ | 10 | Confidence intervals and p-values [9.4 s] -✔ | 14 | Error model fitting [37.9 s] +✔ | 14 | Error model fitting [37.6 s] ✔ | 6 | Test fitting the decline of metabolites from their maximum [0.8 s] ✔ | 1 | Fitting the logistic model [0.9 s] ✔ | 1 | Test dataset class mkinds used in gmkin ✔ | 12 | Special cases of mkinfit calls [2.3 s] ✔ | 9 | 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 [4.1 s] -✔ | 9 | Nonlinear mixed-effects models [12.0 s] +✔ | 9 | Nonlinear mixed-effects models [11.9 s] ✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.2 s] ✔ | 3 | Summary ✔ | 14 | Plotting [4.9 s] ✔ | 4 | AIC calculation ✔ | 4 | Residuals extracted from mkinfit models -✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [5.4 s] -
⠏ | 0 | Summaries of old mkinfit objectsError in attr(val, "df") <- length(object$bparms.optim) + length(object$errparms) : - Versuch ein Attribut von NULL zu setzen -
✔ | 1 | Summaries of old mkinfit objects -✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [7.1 s] +✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [5.3 s] +✔ | 1 | Summaries of old mkinfit objects +✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [7.2 s] ✔ | 9 | Hypothesis tests [37.0 s] ══ Results ═════════════════════════════════════════════════════════════════════ -Duration: 132.2 s +Duration: 131.8 s OK: 154 Failed: 0 diff --git a/tests/testthat/FOCUS_2006_D.csf b/tests/testthat/FOCUS_2006_D.csf index c61b55c4..818c055a 100644 --- a/tests/testthat/FOCUS_2006_D.csf +++ b/tests/testthat/FOCUS_2006_D.csf @@ -5,7 +5,7 @@ Description: MeasurementUnits: % AR TimeUnits: days Comments: Created using mkin::CAKE_export -Date: 2020-04-17 +Date: 2020-04-18 Optimiser: IRLS [Data] diff --git a/tests/testthat/summary_DFOP_FOCUS_C.txt b/tests/testthat/summary_DFOP_FOCUS_C.txt index 4f96c8d3..14e00f62 100644 --- a/tests/testthat/summary_DFOP_FOCUS_C.txt +++ b/tests/testthat/summary_DFOP_FOCUS_C.txt @@ -33,11 +33,6 @@ g_ilr 0.000000 -Inf Inf Fixed parameter values: None -Results: - - AIC BIC logLik - 29.02372 30.00984 -9.511861 - Optimised, transformed parameters with symmetric confidence intervals: Estimate Std. Error Lower Upper parent_0 85.0000 0.66620 83.1500 86.8500 diff --git a/tests/testthat/summary_DFOP_FOCUS_D_deSolve.txt b/tests/testthat/summary_DFOP_FOCUS_D_deSolve.txt index 5a9093c3..66ab9348 100644 --- a/tests/testthat/summary_DFOP_FOCUS_D_deSolve.txt +++ b/tests/testthat/summary_DFOP_FOCUS_D_deSolve.txt @@ -33,11 +33,6 @@ Fixed parameter values: value type m1_0 0 state -Results: - - AIC BIC logLik - 204.4486 212.6365 -97.22429 - Optimised, transformed parameters with symmetric confidence intervals: Estimate Std. Error Lower Upper parent_0 99.600 1.57000 96.400 102.800 diff --git a/tests/testthat/summary_DFOP_FOCUS_D_eigen.txt b/tests/testthat/summary_DFOP_FOCUS_D_eigen.txt index f597cad5..1626c5da 100644 --- a/tests/testthat/summary_DFOP_FOCUS_D_eigen.txt +++ b/tests/testthat/summary_DFOP_FOCUS_D_eigen.txt @@ -33,11 +33,6 @@ Fixed parameter values: value type m1_0 0 state -Results: - - AIC BIC logLik - 204.4486 212.6365 -97.22429 - Optimised, transformed parameters with symmetric confidence intervals: Estimate Std. Error Lower Upper parent_0 99.600 1.57000 96.400 102.800 |