# Howto find documentation?

**URL:** <https://discourse.julialang.org/t/howto-find-documentation/1103>\
**Category:** New to Julia\
**Created:** [December 22, 2016, 2:45pm UTC](https://discourse.julialang.org/t/howto-find-documentation/1103 "2016-12-22T14:45:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ndbecker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ndbecker/32/10829_2.png) [@ndbecker](https://discourse.julialang.org/u/ndbecker)\
**Post date:** [December 22, 2016, 2:45pm UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/1 "2016-12-22T14:45:45Z")

</div>

In python, I can use help(function, module, etc) to get documentation. Even if not documented, I can use dir(object) to discover things about it (e.g., find what’s in a module).

How do I do this with julia?

---

<div class="post-metadata">

**Author:** ![leethargo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leethargo/32/6004_2.png) [@leethargo](https://discourse.julialang.org/u/leethargo)\
**Post date:** [December 22, 2016, 2:51pm UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/2 "2016-12-22T14:51:04Z")

</div>

In the REPL, you can use `?function` to get interactive documentation.

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [December 22, 2016, 2:52pm UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/3 "2016-12-22T14:52:31Z")

</div>

This also works in the IJulia (Jupyter) notebook.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [December 22, 2016, 3:01pm UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/4 "2016-12-22T15:01:40Z")

</div>

Both in the REPL and in a script:

```julia
@doc function-name

```

But, really, the best way to discover how to read the documentation is to [read the documentation](http://docs.julialang.org/en/stable/manual/documentation/) 😉

---

<div class="post-metadata">

**Author:** ![evanfields](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evanfields/32/1744_2.png) [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Post date:** [December 23, 2016, 12:57am UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/5 "2016-12-23T00:57:10Z")

</div>

As previously mentioned, in the REPL a line starting with `?` is a documentation lookup. E.g. `?map` will give you documentation about the function `map`; this also works with types. Interestingly, this also works with packages; you can do `?PackageName` to see the readme for installed package `PackageName`.

Sometimes you don’t know the function you need. Then you can use `apropos` (not in help mode) to search. For example, maybe I don’t know how to create an identity matrix. `apropos("identity")` will give a list of functions which may match.

Sometimes you have an object and don’t know what you can do with it. You can try `methodswith(typeof(object))` (or just `methodswith(T)` if `T` is a type) to see available methods.

---

<div class="post-metadata">

**Author:** ![dfdx](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dfdx/32/120_2.png) [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Post date:** [December 23, 2016, 8:31am UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/6 "2016-12-23T08:31:52Z")

</div>

Since you also mentioned `dir(object)`, you may also be interested in `fieldnames(...)` which lists all fields of an object or type:

```
type MyType
    x::Int
    y::Int
end

fieldnames(MyType) # called on type ==> [:x, :y]
fieldnames(MyType(1, 2)) # called on instances ==> [:x, :y]

```

In case you want to look at actual implementation, you can use `@edit` macro. For example:

```
@edit qr(rand(3,3))

```

will open `qr.jl` in configured editor and point you to the corresponding lines (if editor support it).

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [December 23, 2016, 2:53pm UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/7 "2016-12-23T14:53:16Z")

</div>

I have had a blog post on this “in the works” for quite awhile. Right now it’s just a huge list of commands, and I want a little bit of a walk through it. Here’s a “public preview”

[http://www.stochasticlifestyle.com/?p=96&preview=1&\_ppp=8821b19e7b](http://www.stochasticlifestyle.com/?p=96&preview=1&_ppp=8821b19e7b)

If anyone wants to help me finish it, just let me know.

---

<div class="post-metadata">

**Author:** ![waldyrious](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/waldyrious/32/80_2.png) [@waldyrious](https://discourse.julialang.org/u/waldyrious)\
**Post date:** [December 23, 2016, 3:41pm UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/8 "2016-12-23T15:41:25Z")

</div>

There’s also a nice overview by @astrieanna here: [Julia Helps | juliabloggers.com](http://www.juliabloggers.com/julia-helps/)

---

<div class="post-metadata">

**Author:** ![YongHee-Kim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yonghee-kim/32/5965_2.png) [@YongHee-Kim](https://discourse.julialang.org/u/YongHee-Kim)\
**Post date:** [December 25, 2016, 3:39am UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/9 "2016-12-25T03:39:32Z")

</div>

![](https://global.discourse-cdn.com/julialang/original/3X/a/f/af3de38fd1bdb83b353aa3f43c8cee1bcf14eeef.png)  
It’s not accessible

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [December 25, 2016, 4:58am UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/10 "2016-12-25T04:58:58Z")

</div>

Huh, public preview links must reset after a few days.

[http://www.stochasticlifestyle.com/?p=96&preview=1&\_ppp=9f2c7dab73](http://www.stochasticlifestyle.com/?p=96&preview=1&_ppp=9f2c7dab73)

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [December 25, 2016, 10:37am UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/11 "2016-12-25T10:37:18Z")

</div>

Nice list! Seems to be missing “methods”.

---

<div class="post-metadata">

**Author:** ![YongHee-Kim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yonghee-kim/32/5965_2.png) [@YongHee-Kim](https://discourse.julialang.org/u/YongHee-Kim)\
**Post date:** [December 29, 2016, 6:15am UTC](https://discourse.julialang.org/t/howto-find-documentation/1103/12 "2016-12-29T06:15:54Z")

</div>

thanks, preview link’s been expired again. [This](https://goo.gl/vJo1NO) is a replicate of ChrisRackauckas’s original post.
