Hadley Wickham

Results 2588 comments of Hadley Wickham

Reprex ``` r library(forcats) letters[1:3] %>% factor %>% fct_na_value_to_level('x') #> [1] a b c #> Levels: a b c x ``` Created on 2023-02-27 with [reprex v2.0.2](https://reprex.tidyverse.org)

Looks like we need to add a `na.rm` argument to all `n_distinct()` instances and then call `check_na_rm(na.rm)` to inform the user about what's happening.

What are you looking for here? One of the main drivers of the `databricks()` helper was to generate the data source so that you don't have to 😄

The parser is hand rolled, so quite possible there are problems with my code 😄

We could add something using `remote_metadata()` since that already figures out where an actual pkgdown site is.

I think my informal advice would be "don't do that" 😄 Generally, where I encounter such code in a function, I'll try to refactor it by introducing a variable or...

I think a hanging indent looks fine inside of function calls: ```R fun( arg1 |> arg1_processor1() |> arg1_processor2(), arg2 ) ``` And for if statements, @mine-cetinkaya-rundel suggested another form: ```R...

When attaching, you mean? Sounds reasonable to me, although I'd appreciate a link to the relevant docs.