Skip to content
Prev 21961 / 63424 Next

Question about substitute() and function def

Duncan Murdoch <murdoch at stats.uwo.ca> writes:
Hmm... The issue is that the argument to `function` is a pairlist (not
LANGSXP), and we don't recurse into those. Any R object can turn up as
part of objects of mode "call" (by various methods, not least call()
constructions), and I don't think we want to substitute into any
recursive object. However, it's unlikely that pairlists would be used
for anything other than function arguments, so I suppose we could
change the behaviour (special-casing calls to `function` is an
alternative). Luke?

To wit:
[1] "name"
[1] "pairlist"
[1] "numeric"