In this short article I introduce the spray package, which provides some functionality for handling sparse arrays. The package uses the C++ Standard Template Library's map class to store and retrieve elements. One natural application for sparse arrays is multivariate polynomials and I give two examples of the package in use, one drawn from the fields of random walks on lattices and one from the field of recreational combinatorics. The package is available on CRAN at https://CRAN.R-project.org/package=spray.
翻译:在短篇文章中,我介绍了喷雾软件包,该软件包为处理稀少的阵列提供了一些功能。该软件包使用C++标准模板图书馆的地图类存储和检索元素。一个对稀有阵列的自然应用是多变多元数,我举了两个正在使用的软件包的例子:一个是从拖车上随机行走的字段中提取的,另一个是从娱乐组合场中提取的。该软件包可在CRAN上查阅,网址是:https://CRAN.R-project.org/package=spray。