grinnellm / SpawnIndex

:fish: :egg: Calculate the Pacific Herring spawn index
MIT License
0 stars 2 forks source link

Remove globals.R #46

Open grinnellm opened 3 years ago

grinnellm commented 3 years ago

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.

This would take a while; not sure it's worth it.