Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to provide a specfic type of stratified random simple. In the past I have done this in Excel but figured there might be an easier or better way to do this in R.

I am not sure what this specific type is called so I will describe what I did in Excel. This was employee data: 1. Sample size is prescribed. Example: n = 100 (though N = 10000) 2. Sort entire population (N) by by two fields, for example Organization and Employee Type , and get percentages out of total by stratum. 3. Apply these percentages to sample to get a sample that is representative of entire population. For example if 10% of the population comes from Organiziation/Employee type stratum "Operations/ Engineer" than you should have 10 "Operations/ Engineers" in your sample of 100.

I want to know how to do this in R. What package and function do I use?

BTW Since I am not asking specifically about how to code this I figured it is better to post this here instead of the main SO site. Also I did try searching with findFn(stratified) and came up with pps package but that doesn't seem right and did google search but to no avail.

share|improve this question

closed as off topic by studiohack Jul 7 '12 at 1:48

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

This question might receive more attention on StackOverflow. – ephsmith Jul 6 '12 at 23:20

Browse other questions tagged .