0

I am encountering an error that is driven by a C++ function that has been wrapped using Rcpp. Normally if I needed to edit a function I would just use fix(TheFunction) and edit as needed. While this works for R functions, I can't figure out how to access the underling C++ code.

Is there a simple way to edit an underlining C++ function? One thought I had was forking the GitHub repository, making the edits I need, and then installing the package from my GitHub. I have never done that would it work, or is there a better way?

Ian Wesley
  • 3,565
  • 15
  • 34
  • It would be helpful if you could be more specific. Can you give a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) of a function you want to change. That will make it easier to give specific advice. – MrFlick Apr 10 '17 at 20:56
  • 2
    That is exactly what you need to do. And that has nothing to do with Rcpp per se -- it is simply how _compiled_ code (in any language) works. You need to restart from the source. Alternatively, you can start from the sources and build your own modified version (pursuant to standard open source licenses etc). – Dirk Eddelbuettel Apr 10 '17 at 20:56
  • Thanks Dirk! Before I went down that road I thought I would ask if there was a better way. – Ian Wesley Apr 10 '17 at 21:00

0 Answers0