[R] source for function sample() in package base?

R. Michael Weylandt michael.weylandt at gmail.com
Mon Mar 5 23:24:34 CET 2012


It's an internal function so you have to look into the C sources: it's
here under do_sample, but you'll have to follow all sorts of other
functions down the rabbit hole if you want to understand the whole
thing.

http://svn.r-project.org/R/trunk/src/main/random.c

Michael

On Mon, Mar 5, 2012 at 4:44 PM, kv <kaveh.vakili at ulb.ac.be> wrote:
> Hi all,
>
> were can i find the sources for the function sample()
> (the one from the base package)
>
> thanks in advance,
>
> --
> View this message in context: http://r.789695.n4.nabble.com/source-for-function-sample-in-package-base-tp4447796p4447796.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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