aboutsummaryrefslogtreecommitdiff
path: root/R/nlme.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-09-14 22:39:12 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-09-14 22:39:12 +0200
commitaf24cde56a49b532d7f65dd199d176e0ce3cac09 (patch)
treea6b4d3c263ffee5014af941be9f21dc5cb34ac31 /R/nlme.R
parent569a5790c2f8cca4dc6d8c5a53bd3b7a9f65441f (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/nlme.R')
-rw-r--r--R/nlme.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/nlme.R b/R/nlme.R
index 8762f137..6b2d06d0 100644
--- a/R/nlme.R
+++ b/R/nlme.R
@@ -125,7 +125,7 @@ nlme_function <- function(object) {
}
#' @rdname nlme
-#' @importFrom purrr map_dfr
+#' @importFrom rlang !!!
#' @return A \code{\link{groupedData}} object
#' @export
nlme_data <- function(object) {
@@ -134,7 +134,7 @@ nlme_data <- function(object) {
ds_list <- lapply(object, function(x) x$data[c("time", "variable", "observed")])
names(ds_list) <- ds_names
- ds_nlme <- purrr::map_dfr(ds_list, function(x) x, .id = "ds")
+ ds_nlme <- vctrs::vec_rbind(!!!ds_list, .names_to = "ds")
ds_nlme$variable <- as.character(ds_nlme$variable)
ds_nlme$ds <- ordered(ds_nlme$ds, levels = unique(ds_nlme$ds))
ds_nlme_renamed <- data.frame(ds = ds_nlme$ds, name = ds_nlme$variable,

Contact - Imprint