[R] how to manipulate ... in the argument list
Jim Lemon
drjimlemon at gmail.com
Wed May 11 11:29:19 CEST 2016
Hi Witold,
You could try Ben Bolker's "clean.args" function in the plotrix package.
Jim
On Wed, May 11, 2016 at 6:45 PM, Witold E Wolski <wewolski at gmail.com> wrote:
> Hi,
>
> I am looking for a documentation describing how to manipulate the
> "..." . Searching R-intro.html gives to many not relevant hits for
> "..."
>
> What I want to do is something like this :
>
>
> image.2 <- function(x, col , ...){
> # function is manipulating colors (adding a few)
> # since it changes colors it needs to update breaks if defined.
>
> breaks <- list(...)$breaks
>
> if( !is.null( list(...)$breaks ) ){
> #manipulate breaks
>
> image(x, col, breaks = breaks ,...)
>
> }else{
> image(x,col ,...)
> }
> }
>
> but in order to get it working I will need to remove breaks from ...
> since otherwise I am getting multiple defined argument for breaks.
>
> So how to manipulate the "..." argument? Or should I use a different pattern
>
> best
>
>
>
> --
> Witold Eryk Wolski
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list