aboutsummaryrefslogtreecommitdiff
path: root/R/parms.mkinfit.R
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 /R/parms.mkinfit.R
parent808a679efb69ec6603db6642687d9e8ceb3b3453 (diff)
Update version number, better example formatting
Diffstat (limited to 'R/parms.mkinfit.R')
-rw-r--r--R/parms.mkinfit.R28
1 files changed, 15 insertions, 13 deletions
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, ...)
{

Contact - Imprint