Skip to content
Prev 22946 / 63424 Next

good practice for values not provided

One possibility is:

f <- function(a, b, x) if (missing(x)) a+b else a-b-x

although that does have the disadvantage that one cannot explicitly tell
it not to use x but rather its denoted by its absence.
On 11/19/06, Tamas K Papp <tpapp at princeton.edu> wrote: