ggplot2
ggplot2 copied to clipboard
Improve consistency of naming internal functions
This PR aims to fix #6024.
Briefly, it enforces some consistency on the various check_*() and validate_*() functions in ggplot2's unexported functions.
Check functions:
- Check input verbatim
- Their purpose is to throw conditions when input is unexpected
- Return nothing (that is,
invisible(NULL))
Validator functions:
- Can take different variants of input
- Their purpose is to converge output from input
- Return a single type of output
In addition, a smaller category are functions that take possibly deprecated values and restore it to valid values. I've named these update_*() functions here, but that might be confusing and perhaps we could choose a better name.