spatstat.utils (version 3.0-4)

do.call.without: Call a Function, Omitting Certain Arguments

Description

Call a specified function, omitting some arguments which are inappropriate to the function.

Usage

do.call.without(fun, ..., avoid, envir=parent.frame())

Value

The return value of fun.

Arguments

fun

The function to be called. A function name, a character string giving the name of the function, or an expression that yields a function.

...

Any number of arguments.

avoid

Vector of character strings, giving the names of arguments that should not be passed to fun.

envir

An environment within which to evaluate the call, if any entries of arglist are quoted expressions.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

Details

This is a simple mechanism for preventing some arguments from being passed in a function call. The arguments ... are collected in a list. A argument is omitted if its name exactly matches one of the strings in avoid.

See Also

do.call.matched for a more complicated and flexible call.

Examples

Run this code
  do.call.without(paste, 1, 2, z=3, w=4, avoid="z")

Run the code above in your browser using DataLab