I'm working on an R function that doesn't have all of it's inputs specified at the function call, that is to say, it uses a lot of global variables (parameter values to a model), making things hard to debug.
Is there a way to find all these uses using some tooling? Like a warning of some kind?
Furthermore, what's the best way to refactor this? Pass a list of parameters to the function?
Thanks!