Hi there, I am trying to write a c++ shared library for R. I need a function which has the same functionality as sample() in R, i.e., does permutation, sample with/without replacement. Does R have internal sample routine so that I can call it directly? I did not find it in R.h, Rinternal.h. Thanks