Thanks, Ranjan. Got it! I am now wondering whether there is some simpler way of implementing the following in C:
sample(1:50,5) Paul On Sun, Apr 5, 2009 at 4:10 PM, Ranjan Maitra <mai...@iastate.edu> wrote: > Hi Paul, > > It is in the main/src/random.c file of the source code. > > HTH! > Best wishes, > Ranjan > > On Sun, 5 Apr 2009 15:35:25 +0100 Paul Smith <phh...@gmail.com> wrote: > >> Dear All, >> >> I would like to use the function sample() in a program written in C. >> Is there somewhere the code of sample() written in C? >> >> Thanks in advance, >> >> Paul >> >> ______________________________________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.