aboutsummaryrefslogtreecommitdiff
path: root/R/nlme.mmkin.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-04-15 01:27:02 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-04-15 01:51:55 +0200
commit082be7baa35d7e8131a70ca8cc061d90e08fa584 (patch)
tree29774198fae54ac13f2a0c2d2fb385a5fc44ab92 /R/nlme.mmkin.R
parent26085403289e29259e500282e8e88a5ab00c07a0 (diff)
A plot method for nlme.mmkin fits
Diffstat (limited to 'R/nlme.mmkin.R')
-rw-r--r--R/nlme.mmkin.R9
1 files changed, 5 insertions, 4 deletions
diff --git a/R/nlme.mmkin.R b/R/nlme.mmkin.R
index 784ba609..2ee46f33 100644
--- a/R/nlme.mmkin.R
+++ b/R/nlme.mmkin.R
@@ -22,8 +22,8 @@
#' @param control passed to nlme
#' @param verbose passed to nlme
#' @importFrom stats na.fail
-#' @return Upon success, a fitted nlme.mmkin object, which is
-#' an nlme object with additional elements
+#' @return Upon success, a fitted nlme.mmkin object, which is an nlme object
+#' with additional elements
#' @export
#' @seealso \code{\link{nlme_function}}
#' @examples
@@ -54,7 +54,7 @@ nlme.mmkin <- function(model, data = sys.frame(sys.parent()),
}
deg_func <- nlme_function(model)
- assign("deg_func", deg_func, parent.frame())
+ assign("deg_func", deg_func, globalenv())
# specify the model formula
this_model_text <- paste0("value ~ deg_func(",
@@ -79,7 +79,8 @@ nlme.mmkin <- function(model, data = sys.frame(sys.parent()),
}
val <- do.call("nlme.formula", thisCall)
- return(val)
+ val$mmkin_orig <- model
class(val) <- c("nlme.mmkin", "nlme", "lme")
+ return(val)
}

Contact - Imprint