Skip to content

Commit

Permalink
Faster standalone compact (#1773)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke authored Jan 24, 2025
1 parent fa4fcbd commit b53ac84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/standalone-purrr.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ map_if <- function(.x, .p, .f, ...) {
}

compact <- function(.x) {
Filter(length, .x)
.x[as.logical(lengths(.x))]
}

transpose <- function(.l) {
Expand Down

0 comments on commit b53ac84

Please # to comment.