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

Rolf Turner r.turner at auckland.ac.nz
Sat Mar 11 23:52:22 CET 2017


On 12/03/17 11:11, Mohammad Tanvir Ahamed 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!!
>
> So , in this case how to solve the problem ?

As the problem is stated, you cannot solve it.

Depending on circumstances, there are various approaches that you could 
take.  One would be to get the package source, edit the "myplot" 
function so that it has a "..." argument, and then install the edited 
version.

Since we don't know your circumstances, nor what it is that you really 
need to accomplish (your description of the problem is very vague), it 
is difficult to make suggestions.

cheers,

Rolf Turner

-- 
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-help mailing list