论文标题

R中的无序矢量:引入Disordr软件包

Disordered vectors in R: introducing the disordR package

论文作者

Hankin, Robin K. S.

论文摘要

{\ tt stl map}类中的对象{\ tt c ++}类将一个值与一组键相关联。在R编程语言中,访问该对象的值或键是有问题的,因为值键对未按定义明确的顺序存储。该文档激发并讨论了{\ tt Disorordr}软件包实现的“无序向量”的概念,该软件包有助于处理{\ tt Map}对象。地图的值和键以特定于实现的方式存储,因此应禁止某些提取和更换操作。例如,如果值是真实的,则“第一个”值是实现特定的\ ldots,但最大值具有明确的结果。 {\ tt Disordr}软件包使禁止操作不可能,同时允许透明的R IDIOM进行允许的操作。给出了一个说明性的R会话,其中包含该软件包,而无需引用任何特定的应用程序,然后显示如何用于操纵多元多项式。 {\ tt disordr}软件包是{\ tt clifford},{\ tt freealg},{\ tt hyper2},{\ tt mvp},{\ tt spray},{\ tt spray},{\ tt stokes},以及{\ tt weyl}。 {\ tt Disordr}软件包可在\ url {https://cran.r-project.org/package = disordr}上获得。

Objects in the {\tt stl map} class of {\tt C++} associate a value to each of a set of keys. Accessing values or keys of such an object is problematic in the R programming language because the value-key pairs are not stored in a well-defined order. This document motivates and discusses the concept of "disordered vector" as implemented by the {\tt disordR} package which facilitates the handling of {\tt map} objects. Values and keys of a map are stored in an implementation-specific way so certain extraction and replacement operations should be forbidden. For example, if values are real, then the "first" value is implementation specific\ldots but the maximum value has a well-defined result. The {\tt disordR} package makes forbidden operations impossible while allowing transparent R idiom for permitted operations. An illustrative R session is given in which the package is used abstractly, without reference to any particular application, and then shows how it can be used to manipulate multivariate polynomials. The {\tt disordR} package is a dependency of {\tt clifford}, {\tt freealg}, {\tt hyper2}, {\tt mvp}, {\tt spray}, {\tt stokes}, and {\tt weyl}. The {\tt disordR} package is available on CRAN at \url{https://CRAN.R-project.org/package=disordR}.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源