Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor into proper package and use furrr package #121

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Imports:
arrow,
furrr,
progressr,
tictoc
tictoc,
magrittr
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by roxygen2: do not edit by hand

export("%>%")
export(calculate_most_frequent)
export(convert_to)
export(correct_decimal_sign)
Expand Down Expand Up @@ -42,3 +43,4 @@ export(setup_file_logger)
export(setup_logger)
export(with_file_logger)
importFrom(data.table,"%like%")
importFrom(magrittr,"%>%")
Binary file added R/sysdata.rda
Binary file not shown.
14 changes: 14 additions & 0 deletions R/utils-pipe.R
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we export the magrittr pipe? Can we not use the native R pipe |> or is it a global/refactoring issue and we try to avoid having to replace all existing magrittr pipes with native pipes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes exactly I support this I read this up and there are only very special cases where there is a difference so we should be fine with a global replace

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#' Pipe operator
#'
#' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details.
#'
#' @name %>%
#' @rdname pipe
#' @keywords internal
#' @export
#' @importFrom magrittr %>%
#' @usage lhs \%>\% rhs
#' @param lhs A value or the magrittr placeholder.
#' @param rhs A function call using the magrittr semantics.
#' @return The result of calling `rhs(lhs)`.
NULL
20 changes: 20 additions & 0 deletions man/pipe.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.