I am starting to work on a family of R-packages, all of which have a common common code, which is placed in its own package, allows you to call it myPackageUtilities. Therefore, I have several packages
myPackage1, myPackage2etc.
All of these packages depend on each method in myPackageUtilities. For an example in the real world, see statnet on CRAN . The idea is that a future developer could create myPackageN, and instead of rewriting / duplicating all the supporting code, this future developer could just use myPackageUtilitiesto get started.
There are complications:
1) Some of the code in is myPackageUtilitiesintended for end users, while the rest is for internal development purposes. End-user code must be properly documented using roxygen2. This code includes both S3 classes and shared files, as well as various user support functions.
2) Dependent packages ( myPackage1, myPackage2etc.) are likely to extend the capabilities of S3 defined in myPackageUtilities.
My question is: What is the best way to put it all together? Here are two natural (but not exhuastive) options:
- Include
myPackageUtilitiesin the Import section: for all dependent packages and force users to download separately myPackageUtilities, myPackageUtilities : , myPackageUtilities, . () ::: myPackage1 ..
, , . :
- : :, ,
myPackageUtilities, myPackage1 ..- ,
myPackageUtilities /, .
- S3
myPackageUtilities , rooxgen2 myPackage1?
, , , , !