distr6 is an object-oriented (OO) probability distributions interface leveraging the extensibility and scalability of R6, and the speed and efficiency of Rcpp. Over 50 probability distributions are currently implemented in the package with `core' methods including density, distribution, and generating functions, and more `exotic' ones including hazards and distribution function anti-derivatives. In addition to simple distributions, distr6 supports compositions such as truncation, mixtures, and product distributions. This paper presents the core functionality of the package and demonstrates examples for key use-cases. In addition this paper provides a critical review of the object-oriented programming paradigms in R and describes some novel implementations for design patterns and core object-oriented features introduced by the package for supporting distr6 components.
翻译:distr6是一个以对象为导向的概率分布界面,它利用R6的可扩展性和可缩放性以及Rcpp的速度和效率。目前,在包件中采用了50多个概率分布,采用“核心”方法,包括密度、分布和生成功能,以及更多的“外源”方法,包括危险和分布功能抗衍生物。除了简单的分布外,disstr6还支持诸如短程、混合物和产品分布等成分。本文件介绍了包件的核心功能,并展示了关键使用案例的实例。此外,本文件还严格审查了R的面向目标的方案拟订模式,并介绍了包件为支持 distr6 组件而引入的设计模式和核心目标导向特征的一些新执行情况。