Functions Lookup


#1

My understanding is that for 2.19, there will be no traditional PDF for the functions available to be called from a Stan program due to the move to HTML. When that happened, we postponed what to do about rstan::lookup, whose underlying lookup table was based on parsing the LaTeX index for the user manual.

I think @seantalts had a C++ program to output all of the functions that could be called, but I can’t find it anywhere. Does anyone know where it is?


#2

it exists here (not a great archival copy, but): https://github.com/stan-dev/stan/compare/introspection

Not super complicated to add. One place it’s not ideal is that it can’t tell all of those RNG etc functions that the manual says return R, where R is somewhere defined as something like an int if you wanted just one int, or a double if it was supposed to be a double, or an array of them if you asked for more than 1, etc.


#3

OK, we need to merge something like that, but it would be better if it looked like the index looked for <= 2.18 with things like

> rstan::lookup("sqrt")
    StanFunction Arguments ReturnType Page
620         sqrt     (T x)          R   26

#4

We generate both HTML and pdfs.

Isn’t there also a whole standalone representation being generated for RStudio?


#5

But will the PDF have a machine parseable index? The RStudio thing is generated from the lookup table in the RStan package, which has historically been generated by parsing the index of the user manual and then adding some things by hand.