"boot2"<- function(x, nboot, fun, ...)
{
data<-t(matrix(sample(x,size=length(x)*nboot,replace=T),ncol=nboot))
return(apply(data, 1, fun, ...))
}

