We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
match(<num>, <num>)
I'm propagating this issue from tidyverse/ggplot2#5284
I'd expected that the code below would work similarly as it does for numeric classes.
x <- tibble::num(c(0.001, 0.005)) # Expected output vctrs::vec_match(x, x) #> [1] 1 2 # This bug match(x, x) #> Error in `as.character()`: #> ! Can't convert `x` <pillar_num> to <character>. #> Backtrace: #> ▆ #> 1. ├─base::match(x, x) #> 2. │ ├─base::mtfrm(`<num>`) #> 3. │ └─base::mtfrm.default(`<num>`) #> 4. │ ├─base::as.character(x) #> 5. │ └─vctrs:::as.character.vctrs_vctr(x) #> 6. │ └─vctrs::vec_cast(x, character()) #> 7. └─vctrs (local) `<fn>`() #> 8. └─vctrs::vec_default_cast(...) #> 9. ├─base::withRestarts(...) #> 10. │ └─base (local) withOneRestart(expr, restarts[[1L]]) #> 11. │ └─base (local) doWithOneRestart(return(expr), restart) #> 12. └─vctrs::stop_incompatible_cast(...) #> 13. └─vctrs::stop_incompatible_type(...) #> 14. └─vctrs:::stop_incompatible(...) #> 15. └─vctrs:::stop_vctrs(...) #> 16. └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
Created on 2023-05-02 with reprex v2.0.2
I think the culprit is base::mtfrm.default which uses as.character() in the new R version, whereas it used as.vector() in older versions (e.g. 4.2.2).
base::mtfrm.default
as.character()
as.vector()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm propagating this issue from tidyverse/ggplot2#5284
I'd expected that the code below would work similarly as it does for numeric classes.
Created on 2023-05-02 with reprex v2.0.2
Created on 2023-05-02 with reprex v2.0.2
I think the culprit is
base::mtfrm.default
which usesas.character()
in the new R version, whereas it usedas.vector()
in older versions (e.g. 4.2.2).The text was updated successfully, but these errors were encountered: