Header

UZH-Logo

Maintenance Infos

Extending R packages to support 64-bit compiled code: an illustration with spam64 and GIMMS NDVI$_{3 g}$ Data


Furrer, Reinhard; Gerber, Florian; Mösinger, Kaspar (2017). Extending R packages to support 64-bit compiled code: an illustration with spam64 and GIMMS NDVI$_{3 g}$ Data. Computers & Geosciences, 104:109-119.

Abstract

Software packages for spatial data often implement a hybrid approach of interpreted and compiled programming languages. The compiled parts are usually written in C, C++, or Fortran, and are efficient in terms of computational speed and memory usage. Conversely, the interpreted part serves as a convenient user-interface and calls the compiled code for computationally demanding operations. The price paid for the user friendliness of the interpreted component is—besides performance—the limited access to low level and optimized code. An example of such a restriction is the 64-bit vector support of the widely used statistical language R. On the R side, users do not need to change existing code and may not even notice the extension. On the other hand, interfacing 64-bit compiled code efficiently is challenging. Since many R packages for spatial data could benefit from 64-bit vectors, we investigate strategies to efficiently pass 64-bit vectors to compiled languages. More precisely, we show how to simply extend existing R packages using the foreign function interface to seamlessly support 64-bit vectors. This extension is shown with the sparse matrix algebra R package $_{spam}$. The new capabilities are illustrated with an example of GIMMS NDVI$_{3 g}$ data featuring a parametric modeling approach for a non-stationary covariance matrix.

Abstract

Software packages for spatial data often implement a hybrid approach of interpreted and compiled programming languages. The compiled parts are usually written in C, C++, or Fortran, and are efficient in terms of computational speed and memory usage. Conversely, the interpreted part serves as a convenient user-interface and calls the compiled code for computationally demanding operations. The price paid for the user friendliness of the interpreted component is—besides performance—the limited access to low level and optimized code. An example of such a restriction is the 64-bit vector support of the widely used statistical language R. On the R side, users do not need to change existing code and may not even notice the extension. On the other hand, interfacing 64-bit compiled code efficiently is challenging. Since many R packages for spatial data could benefit from 64-bit vectors, we investigate strategies to efficiently pass 64-bit vectors to compiled languages. More precisely, we show how to simply extend existing R packages using the foreign function interface to seamlessly support 64-bit vectors. This extension is shown with the sparse matrix algebra R package $_{spam}$. The new capabilities are illustrated with an example of GIMMS NDVI$_{3 g}$ data featuring a parametric modeling approach for a non-stationary covariance matrix.

Statistics

Altmetrics

Additional indexing

Item Type:Journal Article, refereed, original work
Communities & Collections:07 Faculty of Science > Institute of Mathematics
Dewey Decimal Classification:510 Mathematics
Language:English
Date:2017
Deposited On:15 Feb 2017 07:11
Last Modified:16 May 2017 01:01
Publisher:Elsevier
ISSN:0098-3004
Publisher DOI:https://doi.org/10.1016/j.cageo.2016.11.015

Download

Full text not available from this repository.
View at publisher