Getting help for Julia functions

Hi

I am a complete noob to the language (first post!) and I am coming from R programming language. I was wondering if there is any R style ‘help’ in the language. For example I am looking to understand more about the parameters of the solve function from OrdinaryDiffEq package, and usually in R I would do something like ?OrdinaryDiffEq::solve.

I tried “solve” and “OrdinaryDiffEq.solve” in the REPL (in help mode), but I am not getting anything to show up.

Essentially, I am interested in supplying a vector of times when I want the ODE system solutions, instead of specifying a time-span (tspan argument in solve function). If anyone has any thoughts or suggestions on how to do that, that will be great also.

Thanks!

2 Likes

Usually typing solve in the help mode (i.e. typing ?solve in the normal Julia REPL) should display the docstring. In your case you are looking for the saveat keyword option. Find the full docs here:

1 Like

Thank you so much!

For some reason, ?solve does not work bash terminal, but did work in VSCode.

Thanks also for the tip regarding saveat, that seems to work as expected.

Hello and welcome.
Just to add that more in general the doc of Julia packages can be accessed either by using the HELP mode (typing the question mark in the REPL) and retrieve the specific element docstring, or by visiting the package github repository and look for the “doc” button, that normally points to a Documenter.jl generated site where on top of the docstring you may have tutorials, examples, and other documentation elements.

2 Likes

Could it be that you copy and pasted ?solve? For help mode to be entered you need to type at least the leading question mark.

4 Likes

In addition to ?solve (which should appear in the REPL as help?> solve), you can also use @doc solve.

3 Likes

Hi and welcome to Julia!
As previously mentioned, sometimes you need to go to the package website to access more complete documentation than is supplied by the doc string available at the Julia REPL. See this post for a way to easily open the package website from the REPL.

1 Like