At the beginning of the project at the end of 2017 we developed
- An R package project development and management strategy,
- “Clean Code” coding rules because contradictory recommendations exist in the R community, e.g., we use “lower camel case” for all functions and parameters,
- We implemented the technical infrastructure to bring such a project to success in a small development team, e.g., Eclipse-based development environment, version control, bug tracking, etc.,
- Rules to structure an R package project: there exist no uniform recommendations yet for structuring a package and naming the source files.
Since 2017, we have continuously expanded our expertise, e.g., we can fall back on a comperehensive development infrastructure with exclusive R packages, which we developed in parallel to the rpact package. Two of these exclusive R packages will be desribed in the next chapters.
R Package Validation Infrastructure
At the beginning of the project we worked out a validation plan and a validation documentation template that was reviewed by our customers who signed our Service Level Agreement (SLA, see https://www.rpact.com/services/sla for more information).
Take a look to the table of contents of the validation documentation. An essential part of the validation are simulations and unit tests which verify that the package works exactly as expected (Performance Qualification). The Installation Qualification on the pharma companies servers can be done easily by calling the rpact function ‘testPackage()’ which executes all available unit tests and provides a test result report (execute ‘?rpact::testPackage’ under R for more information).
For the rpact project we have developed a validation framework and implemented as R package “rpact.validator”. This framework provides the following:
- Semi-automatic creation of unit tests based on templates that results at least in a useful frame for the implementation of specific tests,
- Fully automatic creation of the test plan (LaTeX/PDF) based on the implemented unit tests, incl. tables, action/object descriptions, and expected results,
- Fully automatic creation of the test protocol (LaTeX/PDF) based on the unit test results, incl. tables, summaries, test results, and references to the corresponding test plan items.
The help index of our “rpact.validator” package looks as follows.
R Package Development Tools
Moreover, we implemented some frequently needed functions in a separate R package which we call “rpact.dev”.
To highlight it: the function ‘renderRmdVignettes()’ is very useful because it renders the 15 vignettes which can be found at https://www.rpact.org/vignettes to 3 different output formats and structures the output in one step, i.e., after each new release of the rpact package we need some minutes where we needed many hours before to rebuild the vignettes.
The help index of our “rpact.dev” package looks as follows.
Please contact us if you are interested in our R package development expertise.