Skip to content

print.canned_pred checks contents of non-existent pre (partial-matched to unintended element) #447

@brookslogan

Description

@brookslogan

if ("actions" %in% names(x$pre) && "recipe" %in% names(x$pre$actions)) {

print.canned_epipred <- function(x, name, ...) {
[...]
  if ("actions" %in% names(x$pre) && "recipe" %in% names(x$pre$actions)) {

Presumably, x$pre is supposed to be the preprocessor, but it actually partial-matches to x$predictions.

musing: if not for this coincidence, warnPartialMatchDollar wouldn't have even caught this and we'd just be testing vs. NULL. This is also an issue for epi_archives. (And also epi_dfs though for attrs not list elts.) Is there any sort of list subclass that makes $/attr do exact matches and produce an error rather than NULL when the requested key has no match?

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