How to reproduce the ERROR that the accompanying CRAN sees / how to add .R / Makevars

As part of my PhD project, I completely reworked the early draft of my R quantspec . After I downloaded the tar.gz file received via BUILD, which passed CHECK on my Windows 7 computer using a web form , I received an email that one of the examples in my package created an ERROR.

I tested my package by installing it through

 devtools::install_github("tobiaskley/quantspec", ref="develop") 

on different computers (> 5) that use Windows, Linux, and MacOS as operating systems, but could not reproduce the reported ERROR.

EDIT . It seems to me that I do not see an important step in creating and checking the package. Section 4.3.6 of writing R extensions says that I should add to ~/.R/Makevars something like (for gfortran )

 FCFLAGS = -g -O2 -mtune=native -fbounds-check FFLAGS = -g -O2 -mtune=native -fbounds-check 

How to do it?

+7
fortran r
source share
1 answer

I finally managed to reproduce the error.

For some reason, on all systems (> 5) that I used to test my package, array bound checking was disabled. It can be enabled using options(CBoundsCheck = TRUE) or using the environment variable R_C_BOUNDS_CHECK=yes .

+1
source share

All Articles