do.call.without {spatstat.utils}R Documentation

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())

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.

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.

Value

The return value of fun.

Author(s)

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

See Also

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

Examples

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

[Package spatstat.utils version 3.0-5 Index]