Skip to content

Conversation

simonpcouch
Copy link
Contributor

Closes #1003. :)

@@ -354,6 +354,16 @@ check_outcome <- function(y, spec) {
return(invisible(NULL))
}

has_no_outcome <- if (is.atomic(y)) {is.null(y)} else {length(y) == 0}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For is.atomic(y), note is.atomic(NULL) is TRUE, and for length(y) == 0, y can either be a list or tibble.

Co-authored-by: Emil Hvitfeldt <emil.hvitfeldt@posit.co>
@simonpcouch simonpcouch merged commit b462f76 into main Nov 3, 2023
@simonpcouch simonpcouch deleted the error-1003 branch November 3, 2023 17:04
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better error message if outcome has 0 columns
2 participants