Skip to content

Commit

Permalink
fix: remove pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
averissimo committed Dec 18, 2023
1 parent 0204dd1 commit a66f068
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions R/get_rcode_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
#' @return Character object contain code
#' @keywords internal
get_rcode_libraries <- function() {
vapply(
packages <- vapply(
utils::sessionInfo()$otherPkgs,
function(x) {
paste0("library(", x$Package, ")")
},
function(x) paste0("library(", x$Package, ")"),
character(1)
) %>%
# put it into reverse order to correctly simulate executed code
rev() %>%
paste0(sep = "\n") %>%
paste0(collapse = "")
)
# put it into reverse order to correctly simulate executed code
paste(rev(packages), collapse = "\n")
}


Expand Down

0 comments on commit a66f068

Please sign in to comment.