Portable C++ for R Packages

Package checking errors are more common on Solaris than Linux. In many cases, these errors are due to non-portable C++ code. This article reviews some commonly recurring problems in C++ code found in R packages and suggests solutions.

Martyn Plummer

CRAN packages used


CRAN Task Views implied by cited packages

HighPerformanceComputing, NumericalMathematics


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Plummer, "The R Journal: Portable C++ for R Packages", The R Journal, 2011

BibTeX citation

  author = {Plummer, Martyn},
  title = {The R Journal: Portable C++ for R Packages},
  journal = {The R Journal},
  year = {2011},
  note = {https://doi.org/10.32614/RJ-2011-020},
  doi = {10.32614/RJ-2011-020},
  volume = {3},
  issue = {2},
  issn = {2073-4859},
  pages = {60-63}