Lastly, and regarding the warning of being unable to parse your 'Infinity'
argument, we have had the following segment in Section 2.2 of the vignette
'Rcpp Attributes' for years:

Not all \proglang{C++} default argument values can be parsed into their
\proglang{R} equivalents, however the most common cases are supported, 
including:

  Not all C++ default argument values can be parsed into their R equivalents, 
however
  the most common cases are supported, including:
  • String literals delimited by quotes (e.g. "foo")
  • Decimal numeric values (e.g. 10 or 4.5)
  • Pre-defined constants including true, false, R_NilValue, NA_STRING, 
NA_INTEGER,
  NA_REAL, and NA_LOGICAL.
  • Selected vector types (CharacterVector, IntegerVector, and NumericVector) 
instantiated
  using the ::create static member function.
  • Matrix types instantiated using the rows, cols constructor.

So your use case was out of scope.  You could set the default to NA_REAL and
then (conditionally) replace that value inside the function.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to