aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-05-14 18:47:38 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-05-14 18:47:38 +0200
commita1d7c14feadd175674b3cd8b5d7051bafba5bc3e (patch)
tree613417026ca9aaccfaef8f2358295c6f3fe60b29
parent808a679efb69ec6603db6642687d9e8ceb3b3453 (diff)
Update version number, better example formatting
-rw-r--r--DESCRIPTION4
-rw-r--r--R/parms.mkinfit.R28
-rw-r--r--docs/404.html2
-rw-r--r--docs/articles/index.html2
-rw-r--r--docs/authors.html2
-rw-r--r--docs/index.html2
-rw-r--r--docs/news/index.html2
-rw-r--r--docs/pkgdown.yml2
-rw-r--r--docs/reference/index.html2
-rw-r--r--docs/reference/parms.html22
-rw-r--r--man/parms.Rd5
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 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://pkgdown.jrwb.de/mkin/index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
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 @@
</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.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
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 @@
</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.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
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 @@
</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.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
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 @@
</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.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
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 @@
</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.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
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." />
</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.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
@@ -186,21 +186,13 @@ row for each dataset. If the mmkin object has more than one row, a list of
such matrices is returned.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
- <pre class="examples"><div class='input'><span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>FOCUS_2006_C</span>)</div><div class='output co'>#&gt; <span class='message'>Ordinary least squares optimisation</span></div><div class='output co'>#&gt; Sum of squared residuals at call 1: 2388.077
-#&gt; Sum of squared residuals at call 3: 2388.077
-#&gt; Sum of squared residuals at call 4: 247.1962
-#&gt; Sum of squared residuals at call 7: 200.6791
-#&gt; Sum of squared residuals at call 10: 197.7231
-#&gt; Sum of squared residuals at call 11: 197.0872
-#&gt; Sum of squared residuals at call 14: 196.535
-#&gt; Sum of squared residuals at call 15: 196.535
-#&gt; Sum of squared residuals at call 16: 196.535
-#&gt; Sum of squared residuals at call 17: 196.5334
-#&gt; Sum of squared residuals at call 20: 196.5334
-#&gt; Sum of squared residuals at call 25: 196.5334
-#&gt; Negative log-likelihood at call 31: 26.64668</div><div class='output co'>#&gt; <span class='message'>Optimisation successfully terminated.</span></div><div class='input'><span class='fu'>parms</span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; parent_0 k_parent_sink sigma
+ <pre class="examples"><div class='input'><span class='co'># mkinfit objects</span>
+<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'>parms</span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; parent_0 k_parent_sink sigma
#&gt; 82.4921598 0.3060633 4.6730124 </div><div class='input'><span class='fu'>parms</span>(<span class='no'>fit</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; parent_0 log_k_parent_sink sigma
-#&gt; 82.492160 -1.183963 4.673012 </div><div class='input'><span class='no'>ds</span> <span class='kw'>&lt;-</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>],
+#&gt; 82.492160 -1.183963 4.673012 </div><div class='input'>
+<span class='co'># mmkin objects</span>
+<span class='no'>ds</span> <span class='kw'>&lt;-</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='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></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='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>ds</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>6</span>:<span class='fl'>10</span>)
<span class='no'>fits</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>), <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
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)

Contact - Imprint