[R] Aliases for arguments in a function

2006-08-15 Thread [EMAIL PROTECTED]
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

Re: [R] Aliases for arguments in a function

2006-08-15 Thread Richard M. Heiberger
foo - function(arg1, this, that) { if (missing(this) !missing(that)) this - that if(this 0) stop(this must be positive) return(arg1/this) } foo(arg1=5, this=10) foo(arg1=5, that=10) __ R-help@stat.math.ethz.ch mailing list

Re: [R] Aliases for arguments in a function

2006-08-15 Thread Prof Brian Ripley
foo - function(arg1, this=that, that) ... works. On Tue, 15 Aug 2006, [EMAIL PROTECTED] wrote: 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