library(BHH2)
# Permutation test for Tomato Data
data(tomato.data)
cat("Tomato Data (not paired):
")
attach(tomato.data)
a <- pounds[fertilizer=="A"]
b <- pounds[fertilizer=="B"]
print(round(test <- permtest(b,a),3))
detach()
# Permutation test for Boy's Shoes Example
data(shoes.data)
cat("Shoes Data (paired):
")
attach(shoes.data)
x <- matB-matA
print(round(test <- permtest(x),3))
detach()
Run the code above in your browser using DataLab