Check for Missing Arguments

DESCRIPTION:

Returns a logical value that tells whether or not name was supplied as an argument to the function in which missing is placed.

USAGE:

missing(name) 

REQUIRED ARGUMENTS:

name
the name of one of the arguments to the function in which the call to missing occurs.

VALUE:

logical value: TRUE if the current call did not supply the argument named, FALSE if it did. It is an error if the argument to missing is not the name of an argument.

NOTE:

missing allows arguments to be omitted even though no default value is supplied (provided that some appropriate action is taken before the value of the argument is needed).

DETAILS:

Used internally within a function as a conditional. Checks to see if the name argument was supplied to the function.

SEE ALSO:

, .

EXAMPLES:

function(y, weight) 
        { 
        if(!missing(weight))y <- y * sqrt(weight) 
        ... 
        }