Simon Knos
2011-Feb-10 16:55 UTC
[R] Modifying a package name / Build from sources (rpart)
Dear List Members Upfront: I am not sure if this is the right place to ask this question even after reading through the FAQ, so apologies if I should have directed the question elsewhere. My problem as follows: I need a modified version of some existing R package. I am well able to make the modifications in the C code of the package and can build it by R CMD. However, I would like to install and load the package differently, i.e., instead of library(packageorig) I would like to load it by library(packagemod) such that the functions names provided by the package remain identical but the library / packagename is different. More specifically, I need a different cross-validtion scheme in the package rpart. Which parts of the sources do I need to adapt? Can you point me to some resources where this kind of questions is answered? Kind regards and many thanks in advance, Simon [[alternative HTML version deleted]]
Ben Bolker
2011-Feb-10 18:13 UTC
[R] Modifying a package name / Build from sources (rpart)
Simon Knos <simon_mailing <at> quantentunnel.de> writes:> Upfront: I am not sure if this is the right place to ask this question even > after reading through the FAQ, so apologies if I should have directed the > question elsewhere.I appreciate your confusion. I think this might be slightly more appropriate for r-devel, but it's a judgment call.> My problem as follows: I need a modified version of some existing R package. > I am well able to make the modifications in the C code of the package and > can build it by R CMD. However, I would like to install and load the package > differently, i.e., instead of library(packageorig) I would like to load it > by library(packagemod) such that the functions names provided by the package > remain identical but the library / packagename is different. > > More specifically, I need a different cross-validtion scheme in the package > rpart. > > Which parts of the sources do I need to adapt? Can you point me to > some resources where this kind of questions is answered?I think that if you simply modify the "Package:" entry in the DESCRIPTION file that will do the trick. It might be a good idea to modify the version/author/maintainer lines as well to avoid future confusion. See the R "Installation and Administration" manual. Ben Bolker