I believe you can do what you want with ?sample .  Use your known distribution function b(x) to generate a vector of probabilities, say bprob , then 

sample(x,size, replace=TRUE,prob=bprob)


There are some very interesting methods for generating samples from arbitrary distributions.  See for example, Normal RandomNumbers:UsingMachine AnalysisTo Choosethe BestAlgorithm
W. H. PAYNE WashlngtonState University  (somewhere on the web), or Numerical Recipes in C
The Art of Scientific Computing Second Edition
William H. Press,Saul A. Teukolsky et al, chapter 7.3

Modified exponential distribution in R
I don't have any Kosher salt on hand and I'm cooking a rib eye steak tonight. Can I just use table salt, or would that drastically effect the taste of the steak?

Why is Kosher salt better to use?
