Boot() function inquiry

I'm curious about why this works:
fc <- function(s, i){
s <- data[i,]
return(mean(s$variable, na.rm=T))
}
bootmean <- boot(data, fc, R=500)

But this does not:
fc <- function(s, i, x){
s <- data[i,]
return(mean(s$x, na.rm=T))
}
bootmean <- boot(data, fc, R=500, x=variable)

Where variable is an variable in a dataframe.

Thank you!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.