From d4a49b4837de347d34b2c198de7342c34b0fab63 Mon Sep 17 00:00:00 2001
From: Johannes Ranke <jranke@uni-bremen.de>
Date: Tue, 14 Apr 2020 11:45:49 +0200
Subject: Keep order of datasets in nlme_data, add a plot

---
 man/nlme.Rd | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'man')

diff --git a/man/nlme.Rd b/man/nlme.Rd
index 7527f09d..8e5c2aa0 100644
--- a/man/nlme.Rd
+++ b/man/nlme.Rd
@@ -16,7 +16,7 @@ nlme_data(object)
 \item{object}{An mmkin row object containing several fits of the same model to different datasets}
 }
 \value{
-A function that can be used with \code{link{nlme}}
+A function that can be used with nlme
 
 A named vector containing mean values of the fitted degradation model parameters
 
@@ -53,6 +53,11 @@ f <- mmkin("SFO", ds, cores = 1, quiet = TRUE)
 mean_dp <- mean_degparms(f)
 grouped_data <- nlme_data(f)
 nlme_f <- nlme_function(f)
+# These assignments are necessary for these objects to be
+# visible to nlme and augPred when evaluation is done by
+# pkgdown to generated the html docs.
+assign("nlme_f", nlme_f, globalenv())
+assign("grouped_data", grouped_data, globalenv())
 
 library(nlme)
 m_nlme <- nlme(value ~ nlme_f(name, time, parent_0, log_k_parent_sink),
@@ -61,6 +66,7 @@ m_nlme <- nlme(value ~ nlme_f(name, time, parent_0, log_k_parent_sink),
   random = pdDiag(parent_0 + log_k_parent_sink ~ 1),
   start = mean_dp)
 summary(m_nlme)
+plot(augPred(m_nlme, level = 0:1), layout = c(3, 1))
 
 \dontrun{
   # Test on some real data
-- 
cgit v1.2.1