Skip to content

Add functions to subset or arrange verbose & critical output #35

@EeethB

Description

@EeethB

Overview

I find myself searching for all verbose/critical output that contains/doesn't contain e.g. hypotheses 2 & 4. This takes quite a lot of searching and scanning across blocks of numbers, sometimes tracking multiple rows/columns at the same time. And I get lost a lot doing this! Also, large enough graphs start cutting off critical output because of data length

Usage - subset()

So if you have some res <- test_graph(g, p, verbose = TRUE, critical = TRUE), these functions could say subset_test_results(res, c(2, 4), keep = TRUE, which = c("verbose", "critical")) and return a test object with

  1. verbose results filtered for intersections containing (or not containing if keep = FALSE) hypotheses 2 and 4
  2. critical results filtered for...
    1. Those same intersections?
    2. Or only the rows of critical containing hypotheses 2 or 4

Usage - sort()

There could also be one to sort_test_results(res, c(2, 4), first = TRUE, which = c("verbose", "critical")), which would keep all results, but put 2/4-related intersections first (last).

Related

#26 has some ideas about this related to formatting, and this issue could build on that, or be made separately.
#27 could also be related, as these could be done as generics for sort() and subset()`

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions