Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A very strange error in an edge case #7008

Open
psychelzh opened this issue Apr 2, 2024 · 0 comments
Open

A very strange error in an edge case #7008

psychelzh opened this issue Apr 2, 2024 · 0 comments

Comments

@psychelzh
Copy link

psychelzh commented Apr 2, 2024

Please briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on https://stackoverflow.com/ or https://community.rstudio.com/.

Please include a minimal reproducible example (AKA a reprex). If you've never heard of a reprex before, start by reading https://www.tidyverse.org/help/#reprex.


In the following example, the dplyr warning will result into an error:

suppressPackageStartupMessages(library(dplyr))
f <- function() {
  data.frame(id = 1:2) |> 
    summarise(n = warning("test"), .by = "id")
}
mtcars |> 
  reframe(f(), .by = "gear")
#> Error:
#> ! Failed to evaluate glue component {label}
#> Caused by error in `vapply()`:
#> ! values must be length 1,
#>  but FUN(X[[1]]) result is length 0

Created on 2024-04-02 with reprex v2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant