############
## Example 1
############
#select a sample
s=srswor(3,10)
#the sample is
which(s==1)
############
## Example 2
############
data(belgianmunicipalities)
Tot=belgianmunicipalities$Tot04
name=belgianmunicipalities$Commune
n=200
#select a sample
s=srswor(n,length(Tot))
#the sample is
which(s==1)
#names of the selected units
as.vector(name[s==1])
Run the code above in your browser using DataLab