Le 24/03/10 21:26, Douglas Bates a écrit :
>
> On Wed, Mar 24, 2010 at 2:47 PM, Dirk Eddelbuettel wrote:
>>
>> On 24 March 2010 at 13:31, Douglas Bates wrote:
>> | I find myself writing code like
>> |
>> |Rcpp::NumericVector mu(arg);
>> |Rcpp::NumericVector eta(mu.size());
>> | ...
>> |
>>
On Wed, Mar 24, 2010 at 2:47 PM, Dirk Eddelbuettel wrote:
>
> On 24 March 2010 at 13:31, Douglas Bates wrote:
> | I find myself writing code like
> |
> | Rcpp::NumericVector mu(arg);
> | Rcpp::NumericVector eta(mu.size());
> | ...
> |
> | because I need to ensure that mu is constructed from
On 24 March 2010 at 13:31, Douglas Bates wrote:
| I find myself writing code like
|
|Rcpp::NumericVector mu(arg);
|Rcpp::NumericVector eta(mu.size());
| ...
|
| because I need to ensure that mu is constructed from the argument SEXP
| before its size can be used to construct eta. Is the
I find myself writing code like
Rcpp::NumericVector mu(arg);
Rcpp::NumericVector eta(mu.size());
...
because I need to ensure that mu is constructed from the argument SEXP
before its size can be used to construct eta. Is the order of
initializations compiler-dependent or defined by the sta
I'm in the land of second guessing here, but I think the "slicing"
occurs because of this typedef:
#ifdef __cplusplus
typedef SEXP (*VarFun)(...);
#else
typedef DL_FUNC VarFun;
#endif
so foo is seen as a VarFun. I don't think what I want is possible...
Le 24/03/10 15:22, Romain Francois a écri
Hello,
I'd like to be able to simply define functions like this :
SEXP foo( IntegerVector x ){
// .. do something with x
}
instead of this:
SEXP foo( SEXP x){
IntegerVector xx(x) ;
}
and there is something in do_dotcode (I don't know what) that prevents
this. With this file :