Dear all,
I have noticed an issue with preserving attributes (or rather attributes that
are not preserved). Consider this code where I take the log of an array:
#include
using namespace Rcpp;
//[[Rcpp::export]]
NumericVector fun1(NumericVector x){
return log( x );
}
//[[Rcpp::export]]
Numer
Dear list first of all happy new year.
I have a question .. I would like to call rcpp function (so c++ function) into
R function (optim for example) called into rcpp. I had prototype an example
code and post
below. (Using Rcpp::InternalFunction(&foo))
Is it correct the way I had used? There i
Dear list first of all happy new year.
I have a question .. I would like to call rcpp function (so c++
function) into
R function (optim for example)
called into rcpp. I had prototype an example code and post
below. (Using Rcpp::InternalFunction(&foo))
Is it correct the way I had used? There i
On 4 January 2015 at 10:56, bbo...@tin.it wrote:
| Dear list first of all happy new year.
| I have a question .. I would like to call rcpp function (so c++ function)
into
| R function (optim for example) called into rcpp. I had prototype an example
| code and post
| below. (Using Rcpp::Internal
Søren,
Happy New Year!
On 4 January 2015 at 09:53, Søren Højsgaard wrote:
| Dear all,
|
| I have noticed an issue with preserving attributes (or rather attributes that
are not preserved). Consider this code where I take the log of an array:
Quite possible.
Attributes are just attached to ob
Thanks! Probably a stupid question, but where are these functions defined? In
math.h I see
VECTORIZED_MATH_1(log,::log)
but - where to look for the implementation?
Cheers
Søren
|-Original Message-
|From: Dirk Eddelbuettel [mailto:e...@debian.org]
|Sent: 4. januar 2015 16:32
|To: Søren
On 4 January 2015 at 19:58, Søren Højsgaard wrote:
| Thanks! Probably a stupid question, but where are these functions defined? In
math.h I see
|
| VECTORIZED_MATH_1(log,::log)
|
| but - where to look for the implementation?
You mean where VECTORIZED_MATH is defined?
Let me introduce you to
Hi Dirk,
Cunning piece of code you pointed me to ('ag' seems like a good friend):
#define VECTORIZED_MATH_1(__NAME__,__SYMBOL__) \
namespace Rcpp{ \
template
Dear all,
Thank you for your responses. I will look into the resources and code you
have shared and hopefully I can figure something out! I appreciate your
time and help.
Simon
On Fri, Jan 2, 2015 at 12:45 PM, Mark Clements wrote:
> Alternatively, one could use the code for Brent_fmin() from t