Sampling from a population with individual probabilities? I would like to draw sample from a population but I want my sampling probability to be different for each individual. For example, suppose I will take a sample of two from a population of three which is made up of c("A","B","C"). I want to define sampling probabilities for each of these differently(say 0.6, 0.2, 0.2, respectively). How can I define such a sampling structure in R? I want my sampling to be without replacement. 
 A: If you want an off-the-shelf solution, sample method in R is suitable for you. The first argument, x is your array, the second argument n is number of samples to choose. replace argument is FALSE in your case, which is also the default behavior (for the version (i.e. 3.5.3) in the link). And, you'll give your probability vector to the prob argument. 
Edit: Stick with the R implementation, described above. For the theory behind, I've found this slightly complicated article. There are various others in internet, even for the simple special case $n=2$.
Here I'm leaving my previous incorrect procedure (which is only correct for the first sample) for future readers to save them from a mistake, if by any chance they read this: (Thanks @StasK)
Generate a random number in $[0,1]$, and then map it to the cumulative distribution of your elements (e.g. elements in $[0,0.6)$ maps to $A$, $[0.6,0.8)$ maps to $B$, and so on ...). After picking up your element, remove it from corresponding probability and element arrays, and then normalize your remaining probability vector such that it sums up to $1$; then sample one more element and so on.
