Re: [R] Rcpp, dyn.load and C++ problems

2017-12-03 Thread Dirk Eddelbuettel
On 3 December 2017 at 20:30, Martin Møller Skarbiniks Pedersen wrote: | On 3 December 2017 at 20:19, Dirk Eddelbuettel wrote: | Thanks for your answers. I got a few more questions. | | > | > 0) Wrong list. Rcpp has its down, rcpp-devel, and I basically do not read | > this and would have misse

Re: [R] Rcpp, dyn.load and C++ problems

2017-12-03 Thread Martin Møller Skarbiniks Pedersen
> > > edd@bud:~$ r -lRcpp -e'sourceCpp("/tmp/mmsp.cpp")' ??? What is r in this case ? A alias for something ? Regards Martin [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://st

Re: [R] Rcpp, dyn.load and C++ problems

2017-12-03 Thread Dirk Eddelbuettel
On 3 December 2017 at 11:08, Peter Langfelder wrote: | I would go to the source, in this case Dirk Eddelbuettel's (I hope I | spelled it correctly) You did. Take a point :) | documentation for Rcpp: | | http://dirk.eddelbuettel.com/code/rcpp/Rcpp-attributes.pdf Yup. And RShowDoc("Rcpp-at

Re: [R] Rcpp, dyn.load and C++ problems

2017-12-03 Thread Martin Møller Skarbiniks Pedersen
On 3 December 2017 at 20:19, Dirk Eddelbuettel wrote: Hi Dirk, Thanks for your answers. I got a few more questions. > > 0) Wrong list. Rcpp has its down, rcpp-devel, and I basically do not read > this and would have missed this were it not for luck. OK. I did found the rcpp-devel mailing-list

Re: [R] Rcpp, dyn.load and C++ problems

2017-12-03 Thread Dirk Eddelbuettel
Martin, You are making your life way too complicated. There are a number of things I would do differently: 0) Wrong list. Rcpp has its down, rcpp-devel, and I basically do not read this and would have missed this were it not for luck. On 3 December 2017 at 02:06, Martin Møller Skarbiniks Peder

Re: [R] Rcpp, dyn.load and C++ problems

2017-12-03 Thread Peter Langfelder
I would go to the source, in this case Dirk Eddelbuettel's (I hope I spelled it correctly) documentation for Rcpp: http://dirk.eddelbuettel.com/code/rcpp/Rcpp-attributes.pdf Note that you need to do sourceCpp("logistic_map.cpp") in R instead of building and dyn.load()-ing the object. HTH, Pet

Re: [R] Rcpp, dyn.load and C++ problems

2017-12-03 Thread Martin Møller Skarbiniks Pedersen
On 3 December 2017 at 05:23, Eric Berger wrote: > > Do a search on "Rcpp calling C++ functions from R" > Thanks. However search for "Rcpp calling C++ functions from R" gives a lot of result but I think some of them are outdated and others don't agree with each other. Can you point to a specific

Re: [R] Rcpp, dyn.load and C++ problems

2017-12-03 Thread Martin Møller Skarbiniks Pedersen
On 3 December 2017 at 05:23, Eric Berger wrote: > .Call("compute_values_cpp") > Also, if you were passing arguments to the C++ function you would need to > declare the function differently. > Do a search on "Rcpp calling C++ functions from R" > > Hi, It is still not working. $ ./compile.sh g+

Re: [R] Rcpp, dyn.load and C++ problems

2017-12-02 Thread Eric Berger
.Call("compute_values_cpp") Also, if you were passing arguments to the C++ function you would need to declare the function differently. Do a search on "Rcpp calling C++ functions from R" HTH, Eric On Sun, Dec 3, 2017 at 3:06 AM, Martin Møller Skarbiniks Pedersen < traxpla...@gmail.com> wrote: >

[R] Rcpp, dyn.load and C++ problems

2017-12-02 Thread Martin Møller Skarbiniks Pedersen
Hi, I have written a small C++ function and compile it. However in R I can't see the function I have defined in C++. I have read some web-pages about Rcpp and C++ but it is a bit confusion for me. Anyway, This is the C++-code: #include using namespace Rcpp; // [[Rcpp::export]] List com