Re: [R-pkg-devel] R package with external C++ library

2016-08-03 Thread Ege Rubak
Thanks for the good specific suggestions Kevin and Max. It is amazing that great help is available from the R community in such a short time. Clearly everybody thinks that these issues should be fixed before I even try to submit to CRAN (and I fully agree that they shouldn't lower their standa

Re: [R-pkg-devel] R package with external C++ library

2016-08-03 Thread Kevin Ushey
On Wed, Aug 3, 2016 at 3:09 PM, MTurgeon wrote: > Hi Ege, > > For writing to standard output/error, you can use Rcout or Rcerr (defined by > Rcpp; they even have a vignette showing how to use it in the Rcpp gallery). > Alternatively, if you're using C code, you can replace printf by Rprintf > (thi

Re: [R-pkg-devel] R package with external C++ library

2016-08-03 Thread Kevin Ushey
It looks like most of these usages of std::cout, std::cerr and abort are coming from the logging infrastructure: https://github.com/micolous/s2-geometry-library/blob/master/geometry/base/logging.h If you wanted to make this work on CRAN, you could patch these files in a number of ways: You could

Re: [R-pkg-devel] R package with external C++ library

2016-08-03 Thread MTurgeon
Hi Ege, For writing to standard output/error, you can use Rcout or Rcerr (defined by Rcpp; they even have a vignette showing how to use it in the Rcpp gallery). Alternatively, if you're using C code, you can replace printf by Rprintf (this is explained in Writing R extensions, section 6.5).

Re: [R-pkg-devel] R package with external C++ library

2016-08-03 Thread Duncan Murdoch
On 03/08/2016 5:59 PM, Ege Rubak wrote: The main things seem to be related to (travis log is at https://travis-ci.org/spatstat/s2/jobs/149578339): 1. Deprecated C++ headers and . 2. Compiled code that calls entry points which might terminate R or write to stdout/stderr. Is it hopeless to ge

Re: [R-pkg-devel] R package with external C++ library

2016-08-03 Thread Ege Rubak
The main things seem to be related to (travis log is at https://travis-ci.org/spatstat/s2/jobs/149578339): 1. Deprecated C++ headers and . 2. Compiled code that calls entry points which might terminate R or write to stdout/stderr. Is it hopeless to get on CRAN with warnings like these? I d

Re: [R-pkg-devel] R package with external C++ library

2016-08-03 Thread Duncan Murdoch
On 03/08/2016 5:36 PM, Ege Rubak wrote: Hi, I would like to port Google's s2-library for spherical geometry (see e.g. https://github.com/micolous/s2-geometry-library for a fork on GitHub). It is not a standard library that can easily be installed on various systems, so I would like to include th

[R-pkg-devel] R package with external C++ library

2016-08-03 Thread Ege Rubak
Hi, I would like to port Google's s2-library for spherical geometry (see e.g. https://github.com/micolous/s2-geometry-library for a fork on GitHub). It is not a standard library that can easily be installed on various systems, so I would like to include the source code in the R package. The c