Skip to contents

This function extracts the records corresponding to each resample from the original distance data and pastes them together in a new data frame which is returned.

Usage

bootstrap.orig.data(orig.data, resample, new.resamples, resamples.no)

Arguments

orig.data

Original data to be bootstrapped

resample

Specifies the resampling unit for bootstrapping, default is transect.id. Must match a column name in orig.data exactly

new.resamples

String of resampled units from data[,"resample"]. Created by create.bootstrap.data()

resamples.no

Length of new.resamples

Value

Returns bootstrapped data. Internal function called by function create.bootstrap.data.

Examples

data(dis.data.re)
resample<-"transect.id"
samples<-unique(dis.data.re[,resample])
resamples.no<-length(samples)
new.resamples<-sample(samples,resamples.no,replace=TRUE)
bootstrap.data<-bootstrap.orig.data(dis.data.re,resample,new.resamples,resamples.no)