From e22a68e1c92e4494e2d695421f40d099dbd070f2 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 25 May 2020 14:21:04 +0200 Subject: Tell travis where to find the required saemix version --- .travis.yml | 1 + DESCRIPTION | 4 ++-- NAMESPACE | 2 ++ R/saemix.R | 11 +++++------ man/saemix.Rd | 10 ++++------ 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index a376a45f..f01c0557 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ addons: apt: packages: - gcc +r_github_packages: jranke/saemixextension script: - | R CMD build . diff --git a/DESCRIPTION b/DESCRIPTION index 8a71ea6c..06e76f27 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,9 +17,9 @@ Description: Calculation routines based on the FOCUS Kinetics Report (2006, note that no warranty is implied for correctness of results or fitness for a particular purpose. Imports: stats, graphics, methods, deSolve, R6, inline, parallel, numDeriv, - lmtest, pkgbuild, nlme, purrr + lmtest, pkgbuild, nlme, purrr, saemix (>= 3.1.9000) Suggests: knitr, rbenchmark, tikzDevice, testthat, rmarkdown, covr, vdiffr, - benchmarkme, tibble, stats4, saemix (>= 3.1.9000) + benchmarkme, tibble, stats4 License: GPL LazyLoad: yes LazyData: yes diff --git a/NAMESPACE b/NAMESPACE index 4ee0df91..d2298dec 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -91,6 +91,8 @@ importFrom(parallel,mclapply) importFrom(parallel,parLapply) importFrom(pkgbuild,has_compiler) importFrom(purrr,map_dfr) +importFrom(saemix,saemixData) +importFrom(saemix,saemixModel) importFrom(stats,AIC) importFrom(stats,BIC) importFrom(stats,aggregate) diff --git a/R/saemix.R b/R/saemix.R index d3af8b43..69e5fc50 100644 --- a/R/saemix.R +++ b/R/saemix.R @@ -7,6 +7,7 @@ #' #' @param object An mmkin row object containing several fits of the same model to different datasets #' @rdname saemix +#' @importFrom saemix saemixData saemixModel #' @examples #' ds <- lapply(experimental_data_for_UBA_2019[6:10], #' function(x) subset(x$data[c("name", "time", "value")])) @@ -14,13 +15,11 @@ #' sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"), #' A1 = mkinsub("SFO")) #' f_mmkin <- mmkin(list("SFO-SFO" = sfo_sfo), ds, quiet = TRUE, cores = 5) +#' m_saemix <- saemix_model(f_mmkin) +#' d_saemix <- saemix_data(f_mmkin) +#' saemix_options <- list(seed = 123456, save = FALSE, save.graphs = FALSE) #' \dontrun{ -#' if (require(saemix)) { -#' m_saemix <- saemix_model(f_mmkin) -#' d_saemix <- saemix_data(f_mmkin) -#' saemix_options <- list(seed = 123456, save = FALSE, save.graphs = FALSE) -#' saemix(m_saemix, d_saemix, saemix_options) -#' } +#' saemix(m_saemix, d_saemix, saemix_options) #' } #' @return An [saemix::SaemixModel] object. #' @export diff --git a/man/saemix.Rd b/man/saemix.Rd index 292c25aa..23b0a4ad 100644 --- a/man/saemix.Rd +++ b/man/saemix.Rd @@ -32,12 +32,10 @@ names(ds) <- paste("Dataset", 6:10) sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"), A1 = mkinsub("SFO")) f_mmkin <- mmkin(list("SFO-SFO" = sfo_sfo), ds, quiet = TRUE, cores = 5) +m_saemix <- saemix_model(f_mmkin) +d_saemix <- saemix_data(f_mmkin) +saemix_options <- list(seed = 123456, save = FALSE, save.graphs = FALSE) \dontrun{ -if (require(saemix)) { - m_saemix <- saemix_model(f_mmkin) - d_saemix <- saemix_data(f_mmkin) - saemix_options <- list(seed = 123456, save = FALSE, save.graphs = FALSE) - saemix(m_saemix, d_saemix, saemix_options) -} + saemix(m_saemix, d_saemix, saemix_options) } } -- cgit v1.2.1