Skip to content

Commit

Permalink
better applys
Browse files Browse the repository at this point in the history
Co-authored-by: André Veríssimo <[email protected]>
Signed-off-by: Aleksander Chlebowski <[email protected]>
  • Loading branch information
chlebowa and averissimo authored Dec 12, 2023
1 parent 448fd19 commit baa6c24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/FilteredData.R
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ FilteredData <- R6::R6Class( # nolint
#' @return `character(1)` the formatted string
#'
format = function(show_all = FALSE, trim_lines = TRUE) {
datasets <- lapply(self$datanames(), function(dn) private$get_filtered_dataset(dn))
ind <- vapply(datasets, function(x) inherits(x, "DefaultFilteredDataset"), logical(1L))
datasets <- lapply(self$datanames(), private$get_filtered_dataset)
ind <- vapply(datasets, inherits, logical(1L), what = "DefaultFilteredDataset")
states <- do.call(c, lapply(datasets[!ind], function(ds) ds$get_filter_state()))
states_fmt <- format(states, show_all = show_all, trim_lines = trim_lines)
holders_fmt <- lapply(datasets[ind], function(ds) format(ds, show_all = show_all, trim_lines = trim_lines))
holders_fmt <- vapply(datasets[ind], format, character(1L), show_all = show_all, trim_lines = trim_lines)

sprintf(
"%s:\n%s",
Expand Down

0 comments on commit baa6c24

Please sign in to comment.