Discussion about this post

User's avatar
Amit Kohli's avatar

I hate to be pedantic, but want to point out that if we're talking about functions that work with the tidyverse, the first argument should always be the data. I think this is implicit for most users, but maybe not all?

Expand full comment
Peter Albrecht's avatar

Does the facet_grid() function count as something that might 'break' these rules?

I use facet_grid() to tweak the aesthetics of a plot but the facet_grid() function doesn't explicitly require (or need) an argument for the base ggplot or even the source data frame.

facet_grid() works great (and is very intuitive) but I think is an exception to the first bullet of "If a function transforms some existing object, that object is most important and should be the first argument."

Expand full comment
7 more comments...

No posts