воскресенье, 18 июня 2017 г.

R packages useful for general purpose development

The goal of this article is to provide brief overview of R packages which can be useful for general purpose programming in R. I am going to update this article from time to time to add more useful packages here.

  1. testthat. Write unit tests for R code. Alternatives - RUnit.
  2. roxygen2. Auto generate package documentation from special formatted comments in-line provided with R code.
  3. checkmate. Package to implement fast pre-conditions checks and asserts for your code.
  4. logging. Package to organize consistent logging in your R scripts and packages. The package allows to specify different handlers for logging messages (e.g. to redirect them to file, database, console), different level of logging (e.g. for debug purposes or production mode).
  5. lintr. Static code analyzer for R. Can be integrated with testthat package to check code formatting & style to during package compilation. This allows to enforce common. Alternatives - formatR.
  6. argparse. Package to simplify parsing of command line arguments for R scripts.
  7. cyclocomp. Calculate cyclomatic complexity of R functions. Can be used to calculate count of unit tests required to cover all execution paths within function.
  8. covr. Calculates test coverage for R functions.
  9. TypeInfo. Prototype R package to specify types for function parameters & return values. This may be a good way to fight problems with R weak typing.


Комментариев нет:

Отправить комментарий