# Required function: `srs.mean` cars93=read.table("http://www.webpages.uidaho.edu/%7Erenaes/Data/cars93.txt",sep='',header=T) View(cars93) summary(cars93) # setting the seed will allow you to use the same value from R's rng to get same results set.seed(21934) install.packages("sampling"); library(sampling) N=92; n=10 # swor is sampling without replacement s=srswor(10,92) srs=(1:N)[s==1] cars93.srs=cars93[srs,] View(cars93.srs) srs.mean('cars93.srs',cars93.srs$MAXPRICE,10,92)