On 16 August 2013 at 19:38, Romain Francois wrote:
| It was me who missed something actually. I though you called
|
| matteo()
No worries. I would have called that usage pattern out too!
| To my defense, I'm still recovering from an insolation.
Hope you get better soon. At least you have the
Le 16/08/13 19:33, Dirk Eddelbuettel a écrit :
Hi Romain,
On 16 August 2013 at 19:24, Romain Francois wrote:
| Le 14/08/13 16:25, Dirk Eddelbuettel a écrit :
| >
| >
| > On 14 August 2013 at 15:57, Matteo Fasiolo wrote:
| > | thank you very much for your replies. In the end a named vector is
|
Hi Romain,
On 16 August 2013 at 19:24, Romain Francois wrote:
| Le 14/08/13 16:25, Dirk Eddelbuettel a écrit :
| >
| >
| > On 14 August 2013 at 15:57, Matteo Fasiolo wrote:
| > | thank you very much for your replies. In the end a named vector is
| > | enough for my purpose:
| > |
| > | cppFuncti
Le 14/08/13 16:25, Dirk Eddelbuettel a écrit :
On 14 August 2013 at 15:57, Matteo Fasiolo wrote:
| thank you very much for your replies. In the end a named vector is
| enough for my purpose:
|
| cppFunction(
| '
| NumericVector myVett(NumericVector x = NumericVector::create(0) )
| {
| i
On 14 August 2013 at 15:57, Matteo Fasiolo wrote:
| thank you very much for your replies. In the end a named vector is
| enough for my purpose:
|
| cppFunction(
| '
| NumericVector myVett(NumericVector x = NumericVector::create(0) )
| {
| if(x.size() == 0) x = NumericVector::create(_["a"
Dear Dirk and JJ,
thank you very much for your replies. In the end a named vector is
enough for my purpose:
cppFunction(
'
NumericVector myVett(NumericVector x = NumericVector::create(0) )
{
if(x.size() == 0) x = NumericVector::create(_["a"] = 1.0, _["b"] = 2.0);
return x;
}
'
)
myVe
Hi Matteo,
The issue here is that the Rcpp attributes code that parses function
declarations isn't able to parse all syntactic forms of C++ but rather a
subset. The default argument parsing is able to handle scalars, strings,
and simple vector initializations but not more complex expressions like
On 14 August 2013 at 11:42, Matteo Fasiolo wrote:
| Dear Rcpp users,
|
| a very simple question: I have a function that has a Rcpp::List
| among its arguments, and I would like to set a default values for
| that List.
| Unfortunately this code:
|
| cppFunction(
| '
| List myList(List x = Li