The lintr
package, a widely used linter for R code, prefers that you use snake case for object names. “You” includes R core:
In fairness, is.numeric
ought to be called is_numeric
, because dots are supposed to be reserved for S3 methods. R breaks this rule all the time, leading to names like as.data.frame.data.frame
. R updates are named after Peanuts strips; getting dinged by the linter for using a base function is something that would happen to Charlie Brown if he ever took up programming. Apparently, whatever method lintr
uses to exempt base function names from linting doesn’t work when those function names are arguments to another function.
As you might guess from the traceback thirty calls deep on the right of the screen, this wasn’t a great day. But I can’t help but smile when I see a linter commit heresy.