I have an R package (MyPackage) that has some exported (using @export) and some non-exported functions. If I call a non-exported function from elsewhere in the package, what is the most appropriate way to reference it? For example, given the following code:
#' @export
f1 <- function(){
f2()
}
f2 <- function(){
print('hello')
}
When I run linting on the package I get the warning:
no visible global function definition for 'f2'
I could use MyPackage:f2 but my understanding was that this isn't necessary. I do not expect to get the error 'no visible global function definition' for a function within the same package. What is the best practice in this case?