Hi all. I have a function that I would like to use either the argument name as originally defined or another name. Within the function (and other functions) use the argument name as originally written, so I don't want to simply remove the old argument name for the new one, but simply allow the function to treat both argument names as equivalent.
Here is an example: foo <- function(arg1, this) { if(this < 0) stop("this must be positive") return(arg1/this) } foo(arg1=5, this=10) But, I also want foo() to work equivalently with the following (where 'this' and 'that 'are treated as if they were the same): foo(arg1=5, that=10) Any thoughts would be appreciated. Thanks, Ken --------------------------------- [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch 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.