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. Michael Weylandt
2012-Mar-05 22:24 UTC
[R] source for function sample() in package base?
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.
On Mar 5, 2012, at 4:44 PM, kv wrote:> Hi all, > > were can i find the sources for the function sample() > (the one from the base package) > > thanks in advance,Dear kv/ user189035 Please note that cross-posting is frowned upon in the R mailing lists and especially so when you do not give notice that you are doing so. -- David Winsemius, MD West Hartford, CT