[R] Override/Insert (Change) a value (default value) inside a function

Peter Langfelder peter.langfelder at gmail.com
Sun Mar 12 01:51:12 CET 2017


On Sat, Mar 11, 2017 at 2:11 PM, Mohammad Tanvir Ahamed via R-help
<r-help at r-project.org> wrote:
> Thanks for reply.
> as I said , the function in the package is like
> myplot <- function(x,y) { plot(x,y) }
>
> not like
> myplot <- function(x,y) { plot(x,y,...) }
>
> And I cant change the function inside the package!!

The easiest solution __is__ to change the function inside the package.
If the license of the package allows it and your coding skills are up
to it, download the source of the package, make the necessary
modification in the code, and use that. If you make the modifications
so that they are useful for others, you could email the package
maintainer with your code and suggest that he/she incorporates it in
the package for wider release.

Peter



More information about the R-help mailing list