diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2022-09-14 22:39:12 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2022-09-14 22:39:12 +0200 |
commit | af24cde56a49b532d7f65dd199d176e0ce3cac09 (patch) | |
tree | a6b4d3c263ffee5014af941be9f21dc5cb34ac31 /R/mixed.mmkin.R | |
parent | 569a5790c2f8cca4dc6d8c5a53bd3b7a9f65441f (diff) |
Remove purrr dependency
We now directly import from rlang and vctrs, which were indirect
dependencies anyways. purrr::map_dfr is deprecated in the upcoming purrr
1.0, and depends on dplyr (since when?) which is only suggested by
purrr. This would lead new installations of mkin to fail if dplyr is not
installed as well.
Diffstat (limited to 'R/mixed.mmkin.R')
-rw-r--r-- | R/mixed.mmkin.R | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/R/mixed.mmkin.R b/R/mixed.mmkin.R index 682a9a34..fd6d975f 100644 --- a/R/mixed.mmkin.R +++ b/R/mixed.mmkin.R @@ -1,5 +1,6 @@ #' Create a mixed effects model from an mmkin row object #' +#' @importFrom rlang !!! #' @param object An [mmkin] row object #' @param method The method to be used #' @param \dots Currently not used @@ -65,7 +66,7 @@ mixed.mmkin <- function(object, method = c("none"), ...) { function(x) x$data[c("variable", "time", "observed", "predicted", "residual")]) names(ds_list) <- ds_names - res$data <- purrr::map_dfr(ds_list, function(x) x, .id = "ds") + res$data <- vctrs::vec_rbind(!!!ds_list, .names_to = "ds") names(res$data)[1:4] <- c("ds", "name", "time", "value") res$data$name <- as.character(res$data$name) res$data$ds <- ordered(res$data$ds, levels = unique(res$data$ds)) |