Hello,

 

Within the development of a package, I would need to build a specific method
for the  "pmin" function.

I first make "pmin" generic

 

pmin <- function (..., na.rm = FALSE) UseMethod("pmin")

 

pmin.default <- base::pmin

 

Now, within my new method, I would like to change the arguments in . (dot
dot dot) before sending it to the NextMethod. 

 

 

pmin.myobject <- function(., na.rm=FALSE){

                args <- list(.)     

                # Here, I change my args. For example: 

                args <- lapply(args, function(x) x + 1)

 

                # and now, I would like to use NextMethod, and then rebuild
the . from the args

                NextMethod()

                #???

}

                

It does not work, because the "args" is not the DotDotDot. If you see what I
mean. 

 

Could you please help?

 

Thank you.


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to