[R] Code of sample() in C

Paul Smith phhs80 at gmail.com
Sun Apr 5 21:11:04 CEST 2009


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 <maitra at 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 <phhs80 at 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 at 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 at 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.
>




More information about the R-help mailing list