1

Due to the characters, I'm having a hard time googling for which package the %||% function comes from.

I have tried googling the string literal, as well as 'percent bar bar percent' and similar.

stevec
  • 41,291
  • 27
  • 223
  • 311

1 Answers1

2

It is present in rlang package. See

?rlang::`%||%`

It behaves like dplyr::coalesce but for NULL values instead of NAs.

Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
  • Thanks @Ronak. I learned two things (the other being that rlang isn't a base R package that loads when R does). Thanks again – stevec Jul 20 '20 at 07:12
  • 1
    Doing `?\`%||%\`` in my console gave two results. `purrr` and `rlang`. It was imported into `purrr` from `rlang`. – Ronak Shah Jul 20 '20 at 07:15
  • I see. I just updated to R 4.0.2 (and haven't installed purrr yet) which must explain why I don't see the same. Thanks again! – stevec Jul 20 '20 at 07:16