Read the R packages from Hadley Wickham.
that you want ,should be the default for packages: you have exported and not exported functions. If you do not explicitly declare the function as exported, it is invisible to the outside and can only be used for other functions inside the package.
Therefore, you do not need to do anything for helper functions. However, you need to mark the function mainas exported.
source
share