From a1d7c14feadd175674b3cd8b5d7051bafba5bc3e Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 14 May 2020 18:47:38 +0200 Subject: Update version number, better example formatting --- DESCRIPTION | 4 ++-- R/parms.mkinfit.R | 28 +++++++++++++++------------- docs/404.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 2 +- docs/pkgdown.yml | 2 +- docs/reference/index.html | 2 +- docs/reference/parms.html | 22 +++++++--------------- man/parms.Rd | 5 ++++- 11 files changed, 35 insertions(+), 38 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 018eb842..96df2cea 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: mkin Type: Package Title: Kinetic Evaluation of Chemical Degradation Data -Version: 0.9.50.2 -Date: 2020-05-12 +Version: 0.9.50.3 +Date: 2020-05-14 Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "jranke@uni-bremen.de", comment = c(ORCID = "0000-0003-4371-6538")), diff --git a/R/parms.mkinfit.R b/R/parms.mkinfit.R index f173ef51..aae6fa52 100644 --- a/R/parms.mkinfit.R +++ b/R/parms.mkinfit.R @@ -11,6 +11,21 @@ #' For mmkin row objects, a matrix with the parameters with a #' row for each dataset. If the mmkin object has more than one row, a list of #' such matrices is returned. +#' @examples +#' # mkinfit objects +#' fit <- mkinfit("SFO", FOCUS_2006_C, quiet = TRUE) +#' parms(fit) +#' parms(fit, transformed = TRUE) +#' +#' # mmkin objects +#' ds <- lapply(experimental_data_for_UBA_2019[6:10], +#' function(x) subset(x$data[c("name", "time", "value")])) +#' names(ds) <- paste("Dataset", 6:10) +#' fits <- mmkin(c("SFO", "FOMC", "DFOP"), ds, quiet = TRUE) +#' parms(fits["SFO", ]) +#' parms(fits[, 2]) +#' parms(fits) +#' parms(fits, transformed = TRUE) #' @export parms <- function(object, ...) { @@ -20,10 +35,6 @@ parms <- function(object, ...) #' @param transformed Should the parameters be returned #' as used internally during the optimisation? #' @rdname parms -#' @examples -#' fit <- mkinfit("SFO", FOCUS_2006_C) -#' parms(fit) -#' parms(fit, transformed = TRUE) #' @export parms.mkinfit <- function(object, transformed = FALSE, ...) { @@ -32,15 +43,6 @@ parms.mkinfit <- function(object, transformed = FALSE, ...) } #' @rdname parms -#' @examples -#' ds <- lapply(experimental_data_for_UBA_2019[6:10], -#' function(x) subset(x$data[c("name", "time", "value")])) -#' names(ds) <- paste("Dataset", 6:10) -#' fits <- mmkin(c("SFO", "FOMC", "DFOP"), ds, quiet = TRUE) -#' parms(fits["SFO", ]) -#' parms(fits[, 2]) -#' parms(fits) -#' parms(fits, transformed = TRUE) #' @export parms.mmkin <- function(object, transformed = FALSE, ...) { diff --git a/docs/404.html b/docs/404.html index cf08fa1d..e64d5690 100644 --- a/docs/404.html +++ b/docs/404.html @@ -71,7 +71,7 @@ mkin - 0.9.50.2 + 0.9.50.3 diff --git a/docs/articles/index.html b/docs/articles/index.html index a251976a..7b003598 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -71,7 +71,7 @@ mkin - 0.9.50.2 + 0.9.50.3 diff --git a/docs/authors.html b/docs/authors.html index ab3c6ae7..abf2534e 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -71,7 +71,7 @@ mkin - 0.9.50.2 + 0.9.50.3 diff --git a/docs/index.html b/docs/index.html index e05fb911..b2e60178 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,7 +37,7 @@ mkin - 0.9.50.2 + 0.9.50.3 diff --git a/docs/news/index.html b/docs/news/index.html index c3713a94..b8b7dacd 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -71,7 +71,7 @@ mkin - 0.9.50.2 + 0.9.50.3 diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 77d13196..3c25ad85 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -10,7 +10,7 @@ articles: NAFTA_examples: web_only/NAFTA_examples.html benchmarks: web_only/benchmarks.html compiled_models: web_only/compiled_models.html -last_built: 2020-05-14T16:37Z +last_built: 2020-05-14T16:46Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/reference/index.html b/docs/reference/index.html index 4b0d6317..b418b6ab 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -71,7 +71,7 @@ mkin - 0.9.50.2 + 0.9.50.3 diff --git a/docs/reference/parms.html b/docs/reference/parms.html index cb705d2c..432bbc88 100644 --- a/docs/reference/parms.html +++ b/docs/reference/parms.html @@ -74,7 +74,7 @@ considering the error structure that was assumed for the fit." /> mkin - 0.9.50.2 + 0.9.50.3 @@ -186,21 +186,13 @@ row for each dataset. If the mmkin object has more than one row, a list of such matrices is returned.

Examples

-
fit <- mkinfit("SFO", FOCUS_2006_C)
#> Ordinary least squares optimisation
#> Sum of squared residuals at call 1: 2388.077 -#> Sum of squared residuals at call 3: 2388.077 -#> Sum of squared residuals at call 4: 247.1962 -#> Sum of squared residuals at call 7: 200.6791 -#> Sum of squared residuals at call 10: 197.7231 -#> Sum of squared residuals at call 11: 197.0872 -#> Sum of squared residuals at call 14: 196.535 -#> Sum of squared residuals at call 15: 196.535 -#> Sum of squared residuals at call 16: 196.535 -#> Sum of squared residuals at call 17: 196.5334 -#> Sum of squared residuals at call 20: 196.5334 -#> Sum of squared residuals at call 25: 196.5334 -#> Negative log-likelihood at call 31: 26.64668
#> Optimisation successfully terminated.
parms(fit)
#> parent_0 k_parent_sink sigma +
# mkinfit objects +fit <- mkinfit("SFO", FOCUS_2006_C, quiet = TRUE) +parms(fit)
#> parent_0 k_parent_sink sigma #> 82.4921598 0.3060633 4.6730124
parms(fit, transformed = TRUE)
#> parent_0 log_k_parent_sink sigma -#> 82.492160 -1.183963 4.673012
ds <- lapply(experimental_data_for_UBA_2019[6:10], +#> 82.492160 -1.183963 4.673012
+# mmkin objects +ds <- lapply(experimental_data_for_UBA_2019[6:10], function(x) subset(x$data[c("name", "time", "value")])) names(ds) <- paste("Dataset", 6:10) fits <- mmkin(c("SFO", "FOMC", "DFOP"), ds, quiet = TRUE) diff --git a/man/parms.Rd b/man/parms.Rd index 87e23781..d3917639 100644 --- a/man/parms.Rd +++ b/man/parms.Rd @@ -33,9 +33,12 @@ model parameters, in order to avoid working with a fitted model without considering the error structure that was assumed for the fit. } \examples{ -fit <- mkinfit("SFO", FOCUS_2006_C) +# mkinfit objects +fit <- mkinfit("SFO", FOCUS_2006_C, quiet = TRUE) parms(fit) parms(fit, transformed = TRUE) + +# mmkin objects ds <- lapply(experimental_data_for_UBA_2019[6:10], function(x) subset(x$data[c("name", "time", "value")])) names(ds) <- paste("Dataset", 6:10) -- cgit v1.2.1