Skip to content

JOSS review - function documentation (exclude_all) #17

Closed
@debruine

Description

@debruine

Review issue: openjournals/joss-reviews#4707
Branch reviewed: main

You describe the exclude_all() function as "...takes multiple criteria and applies them in a step-wise manner, summarising at each step." The exclusion count shows that the exclusion criteria are each separately run on the full pre-exclusions set, then all excluded observations are removed (and some may be excluded by more than 1 criterion). This is consistent with the behaviour of filter(), but not behaviour I'd describe as "step-wise".

The distinction can be really important if you’re excluding based on summary statistics of the existing data. It might be useful to include a concrete example, like the difference between these two:

# simultaneous evaluation of criteria
data.frame(a = 1:10) |>
  track() |>
  exclude_all(
    a > 9 ~ "{.excluded} value > 9",
    a == max(a) ~ "{.excluded} max value",
  ) |>
  status() |>
  flowchart()
# step-wise evaluation of criteria
data.frame(a = 1:10) |>
  track() |>
  exclude_all(a > 9 ~ "{.excluded} value > 9") |>
  exclude_all(a == max(a) ~ "{.excluded} max value") |>
  status() |>
  flowchart()


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions