1

I am trying to look at the source code for function extract.samples() from rethinking package on github with no success.

The best I could find is HERE, but I'm wondering if that is the actual source code or not?

rnorouzian
  • 7,397
  • 5
  • 27
  • 72
  • I'm confused why you think that wouldn't be the actual source code? anyway you can just run print(extract.samples) within R and compare – MichaelChirico Mar 10 '18 at 04:17
  • Are you confused because there are two methods called `extract.samples`? – Joseph Wood Mar 10 '18 at 04:25
  • You can see what is really going on by following the clues. We know we are trying to find a function called `extract` from the `rstan` package. Here is a [start](https://github.com/stan-dev/rstan/blob/3fba2157c619943ea806d835c6ba3f5290e7df71/rstan/rstan/R/stanfit-class.R#L419). Hope this helps. – Joseph Wood Mar 10 '18 at 04:31
  • Do you mean what types of arguments are passed or how to call it? Like [this](https://github.com/rmcelreath/rethinking/blob/1def057174071beb212532d545bc2d8c559760a2/book_code_boxes.txt#L363) – Joseph Wood Mar 10 '18 at 04:40
  • I'm not sure I follow. It is probably best that you thoroughly read the linked post. It is one of my favorite post on SO. I have read the question and answers there several times and I learn something new every time. Sorry I couldn't help further. – Joseph Wood Mar 10 '18 at 04:45
  • @MichaelChirico, thanks for your help. There are two other functions that I can't see the source code for, using `print(function.name)` method. First one is `link` and second one is `sim` any ideas? – rnorouzian Mar 10 '18 at 06:45
  • again, read the assigned duplicate thoroughly. get anywhere should help. – MichaelChirico Mar 10 '18 at 09:44

0 Answers0