An extension of sample to objects of class ‘freqtab’ for bootstrap sampling.
sample.freqtab(x, size = sum(x), replace =TRUE)
Arguments
x: object of class ‘freqtab’ , which is an array of counts across one or more numeric dimensions.
size: non-negative integer giving the sample size.
replace: logical with default TRUE indicating whether sampling should be with replacement.
Returns
A table array, as a ‘freqtab’ object, sampled from the original x.
Examples
# Sample with replacement from ACT math and compare resultsset.seed(2021)rx <- as.freqtab(ACTmath[,1:2])rxs <- sample.freqtab(rx)summary(rx)summary(rxs)