This paper takes the stratified random sampling as an example, and proposes a method for sample extraction and population parameter estimation by using R software under the frame of complete sampling. And the paper also introduces how to use R software to complete the population parameter estimation in the case of only sample data(non-complete sampling frame).