Re: [R] Aliases for arguments in a function

From: Richard M. Heiberger <>
Date: Tue 15 Aug 2006 - 22:39:40 EST

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) mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue Aug 15 22:44:32 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 16 Aug 2006 - 00:21:54 EST.

Mailing list information is available at Please read the posting guide before posting to the list.