Re: [Rcpp-devel] How to give default value with Rcpp and roxygen2 involving seq_len

2016-01-13 Thread Dirk Eddelbuettel
On 13 January 2016 at 16:41, Lafaye de Micheaux Pierre wrote: | Hello everybody, | | Let's consider the simple function: | | f <- function(x = 1:10) {return(x)} | | where the argument 'x' could take non integer values. | | I would like to create such a function using Rcpp and roxygen2. If I tr

Re: [Rcpp-devel] How to give default value with Rcpp and roxygen2 involving seq_len

2016-01-13 Thread JJ Allaire
The parsing of default values for attributes has some significant limitations (it's mostly just use for literals and empty vectors). This is what is currently supported: • String literals delimited by quotes (e.g. "foo") • Decimal numeric values (e.g. 10 or 4.5) • Pre-defined constants including t

[Rcpp-devel] How to give default value with Rcpp and roxygen2 involving seq_len

2016-01-13 Thread Lafaye de Micheaux Pierre
Hello everybody, Let's consider the simple function: f <- function(x = 1:10) {return(x)} where the argument 'x' could take non integer values. I would like to create such a function using Rcpp and roxygen2. If I try something like: //' @param x Vector of real values NumericVector f(NumericVect