dnbinom(x, size, prob) pnbinom(q, size, prob) qnbinom(p, size, prob) rnbinom(n, size, prob)
Elements of q or p that are missing will cause the corresponding elements of the result to be missing.
rbinom(20,10,0.5) # sample of size 20 with mean 10*0.5 = 5