|
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?