It is best practices to avoid having a "globals.R" file. However, omitting the file creates lots of R-CMD-check messages a la:
my_summary_function: no visible binding for global variable ‘x’, ‘grp’, ‘y’Undefined global functions or variables:x grp y
The fix for this is described here; search for "rlang." Essentially, I would need to add
#' @importFrom rlang .data
to each function, and then specify variables using .data$var_name instead of just var_name in mutate() etc.
It is best practices to avoid having a "globals.R" file. However, omitting the file creates lots of
R-CMD-check
messages a la:my_summary_function: no visible binding for global variable ‘x’, ‘grp’, ‘y’
Undefined global functions or variables:
x grp y
The fix for this is described here; search for "rlang." Essentially, I would need to add
#' @importFrom rlang .data
to each function, and then specify variables using.data$var_name
instead of justvar_name
inmutate()
etc.This would take a while; not sure it's worth it.