Skip to content

Commit

Permalink
Merge pull request #132 from PLN-team/fix-plnnetwork
Browse files Browse the repository at this point in the history
fix issue #130 with deprecated use os purrr:map_chr
  • Loading branch information
jchiquet authored Sep 10, 2024
2 parents 185c538 + 6cd21c6 commit e714dcf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BugReports: https://github.com/pln-team/PLNmodels/issues
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Depends: R (>= 3.6)
LazyData: true
biocViews:
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ importFrom(pscl,zeroinfl)
importFrom(purrr,map)
importFrom(purrr,map2)
importFrom(purrr,map2_dbl)
importFrom(purrr,map_chr)
importFrom(purrr,map_dbl)
importFrom(purrr,map_int)
importFrom(purrr,reduce)
Expand Down
4 changes: 2 additions & 2 deletions R/PLNfamily-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @rdname PLNfamily
#' @include PLNfamily-class.R
#' @importFrom R6 R6Class
#' @importFrom purrr map reduce map_chr
#' @importFrom purrr map reduce
PLNfamily <-
R6Class(
classname = "PLNfamily",
Expand Down Expand Up @@ -182,7 +182,7 @@ PLNfamily <-
#' @field convergence sends back a data frame with some convergence diagnostics associated with the optimization process (method, optimal value, etc)
convergence = function() {
res <- purrr::map(self$models, function(model) {
c(nb_param = model$nb_param, purrr::map_chr(model$optim_par, tail, 1))
c(nb_param = model$nb_param, purrr::map(model$optim_par, tail, 1))
}) %>% purrr::reduce(rbind)
data.frame(param = private$params, res, stringsAsFactors = FALSE)
}
Expand Down

0 comments on commit e714dcf

Please sign in to comment.