R/bootstrapsamples.R

bootstrapsamples <-
function(data, numSamples)
{
    boot <- boot(data, function(d, f) f, numSamples)
    dimension <- dim(data)
    samples <- list()
    noSamples <- list()
    array(boot.array(boot, indices = FALSE), c(numSamples, dimension[1])) -> howMany
    array(boot.array(boot, indices = TRUE), c(numSamples, dimension[1])) -> who
    result <- list(who, howMany)
    names(result) <- c("who", "howMany")
    return(result)
}

Try the dawai package in your browser

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

dawai documentation built on May 2, 2019, 6:47 a.m.