klmr / box

Write reusable, composable and modular R code

Home Page:https://klmr.me/box/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduce operator alias for `identical`

klmr opened this issue · comments

Calls to identical() litter the ‘box’ code base (> 40 uses) because == isn’t sufficiently robust.

Replace it by an operator (e.g. %==%) to improve code readability. Compare:

if (identical(declaration, quote(expr =)) && identical(alias, '')) return()
if (declaration %==% quote(expr =) && alias %==% '') return()