Skip to content
Prev 274942 / 398506 Next

How to call a function defined within another function

On Wed, Oct 19, 2011 at 4:08 PM, S?bastien Bihorel <pomchip at free.fr> wrote:
As has already pointed out it can't really be done but if you want a
hack then this will do it.  It does depend on the specific position of
scope.char within step.gam,
function (formula)
{
    formula = update(formula, ~-1 + .)
    tt <- terms(formula)
    tl <- attr(tt, "term.labels")
    if (attr(tt, "intercept"))
        c("1", tl)
    else tl
}