spatstat.utils (version 1.17-0)

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)

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.

Value

The return value of fun.

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
# NOT RUN {
  do.call.without(paste, 1, 2, z=3, w=4, avoid="z")
# }

Run the code above in your browser using DataLab