Title: Theory of Sample Surveys with R