I have several functions in my .Rprofile file:
f1 <- function() { ...... }
f2 <- function() { ...... }
g <- function() { ...... }
The functions f1 and f2 are helper functions for g, and I don't want them in the global environnement. How could I do?
A solution is:
g <- function() {
f1 <- function() { ...... }
f2 <- function() { ...... }
......
}
but I don't like it.
I think I found a solution. I put
f1andf2in a file in another folder (in theinstfolder since I'm in a package) and I do that in.Rprofile:Then when I run
g, the functionsf1andf2do not appear in the global environment.