[R-pkg-devel] Write and print Fortran commands yields Note in R CMD check

Dirk Eddelbuettel edd at debian.org
Thu Sep 14 17:24:56 CEST 2017


On 14 September 2017 at 15:56, Stefan McKinnon Høj-Edwards wrote:
| Oh. I was under the impression the risk of interference was only for stdout
| and stderr.
| 
| I suspect the affected Fortran subroutines should be re-written in R or C.
| Is writing to files with Rcpp affected by the interference?

As you mention Rcpp: we adhere to the manual and redirect to the C facilities
of the R API.  Ie in

    Rcpp::Rcout << "Hello, world\n";

it only looks like streams. In reality, a very clever trick sent to us by
Jelmer many many moons ago turns into a call to Rprintf().
    
| Or would it be feasible to have the Fortran subroutine call a C subroutine
| for writing to files?

Possibly. It's all about avoiding Kurt's regexps :)

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-package-devel mailing list