df <- expand.grid(a=1:10, b=rnorm(10))
df <- data.frame(a=1:10, b=rnorm(10))
fn.tmp <- function(list.obj){
df <- list.obj$data
newdata <- list.obj$newdata
lm.fit <- lm(b~a, data=df)
predict.val <- predict(object = lm.fit, newdata=newdata)
error <- predict.val-newdata$b
return(list(model.fit=lm.fit, predict.val=predict.val, error=error))
}#END fn.tmp
out.list <- jackknife(df, FUN = fn.tmp)
out.list[[1]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.