library(boot)
set.seed(50)
x <- rnorm(100, 1) ## Mean 1 normals
y <- rnorm(100, 0) ## Mean 0 normals
b <- two.boot(x, y, median, R = 100)
hist(b) ## Histogram of the bootstrap replicates
b <- two.boot(x, y, quantile, R = 100, probs = .75)
Run the code above in your browser using DataLab