R/Evalf.R

Defines functions Evalf

Documented in Evalf

##
## p3d:Evalf.R
## 2011-12-22
##

Evalf <-
function( fun, data = newdata, newdata ) {
    # this is meant to evaluate a function much like predict 'evaluates' a model
    inds <- seq_along( rownames(data) )
    ret <- rep(NA, length(inds))
    for ( i in inds ) {
       ret[i] <- do.call(fun,data[i,])
    }
    ret
}

Try the p3d package in your browser

Any scripts or data that you put into this service are public.

p3d documentation built on May 2, 2019, 5:25 p.m.