This helper function checks whether a given function fun
has required or
allowed arguments. The argument check is based only on the names of the
arguments. No any further logic is verified here.
Arguments
- fun
(
function
)
a function name whose argument names will be checked.- mandatory
(
character
orNULL
)
the names of the arguments which must be present infun
. Ifmandatory
is specified asNULL
(default) this requirement is ignored.- allowed
(
character
orNULL
)
the names of the arguments which are allowed infun
. Names that do not belong toallowed
are simply not allowed. Theallowed
parameter is independent from themandatory
, in a sense that ifmandatory
is specified as acharacter
vector, it does not have to be repeated inallowed
. Ifallowed
is specified asNULL
(default), then it means that there must be no any arguments infun
(except these ones which are specified inmandatory
).