Hadley Wickham

Results 2590 comments of Hadley Wickham

This is possible to automate already using the tools in https://roxygen2.r-lib.org/articles/reuse.html#inline-code, combined with careful application of `methods()`. And that's what we do in dplyr: https://github.com/tidyverse/dplyr/blob/main/R/doc-methods.R But it's really hard to...

I don't think it's possible to implement this in forcats, because (and please correct me if I'm wrong) you can't do this with a factor — you need some more...

Given that it requires some special ggplot2 manipulation after creating the variable, I think it would be better to find a home where the two pieces can live together.

Can you give a few more details? I don't think you'd want to turn off capturing the traces, but we could provide more options to prevent their display (and possibly...

I'm reasonably certain that if you follow the instructions in the updated https://testthat.r-lib.org/dev/articles/custom-expectation.html#repeated-code the tracebacks should go away. Please let me know if that doesn't help!

Let's start this with a warning.

Oooh, it's just for `expect_snapshot()`. I think it's fine to remain an error then.

Slightly simpler reprex: ``` r library(testthat) expect_warning(a Error: `a [1] 1 expect_no_warning({warning("x"); b Error: Expected `{ ... }` to run without any warnings. #> ℹ Actually got a with text:...

But: ``` r library(testthat) expect_no_warning({b Error: Expected `{ ... }` to run without any warnings. #> ℹ Actually got a with text: #> x b #> [1] 1 ``` i.e....