11.7 Export

You need to export a function to make it usable outside of your package. When you first create a package, nothing will be exported, even when you have added some functions.

11.7.1 What to export

  • Export functions that you want others to use.
  • Too little is better than too much
  • It is hard to remove/change a function once others are using it

11.7.2 What not to export

  • All functions not related to the problem your package addresses should not be exported
  • Functions that are internally useful can be placed into a utils.R file