Reputation: 20643
I am using a package where I want to add an additional option to its main function and change the content in the main function accordingly. Other than that, I would like to use the package as it is right now.
What is the best way to do this? Any references would be appreciated.
Upvotes: 1
Views: 186
Reputation: 20643
This is what I did.
<package name>:::
in front of the function name.For example, class(results) <- c("rpart","nnet")
Upvotes: 0
Reputation: 14093
If you think your change is needed by the rest of the world, too:
packageDescription ("pkgName") $ Maintainer
), If only you yourself need the change / want to try around locally:
? fix
? assignInNamespace
get the source (packages on CRAN should be FOSS, but better read the license), make your chagne & install that package locally.
if you need to insert a bit of code (like an extra output statement): ? trace
Upvotes: 2