# What is the equivalent of str() in R for Julia

**URL:** <https://discourse.julialang.org/t/what-is-the-equivalent-of-str-in-r-for-julia/50751>\
**Category:** New to Julia\
**Created:** [November 25, 2020, 2:00pm UTC](https://discourse.julialang.org/t/what-is-the-equivalent-of-str-in-r-for-julia/50751 "2020-11-25T14:00:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chuymtz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chuymtz/32/18204_2.png) [@chuymtz](https://discourse.julialang.org/u/chuymtz)\
**Post date:** [November 25, 2020, 2:00pm UTC](https://discourse.julialang.org/t/what-is-the-equivalent-of-str-in-r-for-julia/50751/1 "2020-11-25T14:00:00Z")

</div>

I often use str() whenever im exploring the outuut of some method in a package im getting familiar with, or i forget what a certain function was supposed to output, etc.

Is there some equivalent in Julia that can be applied to a wide range of objects/types?

---

<div class="post-metadata">

**Author:** ![Mattriks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattriks/32/351_2.png) [@Mattriks](https://discourse.julialang.org/u/Mattriks)\
**Post date:** [November 25, 2020, 2:23pm UTC](https://discourse.julialang.org/t/what-is-the-equivalent-of-str-in-r-for-julia/50751/3 "2020-11-25T14:23:21Z")

</div>

```julia
?dump 

```

---

<div class="post-metadata">

**Author:** ![jbrea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbrea/32/3879_2.png) [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Post date:** [November 25, 2020, 4:27pm UTC](https://discourse.julialang.org/t/what-is-the-equivalent-of-str-in-r-for-julia/50751/4 "2020-11-25T16:27:31Z")

</div>

For data frames there is also `describe`.

---

<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:** [November 25, 2020, 4:43pm UTC](https://discourse.julialang.org/t/what-is-the-equivalent-of-str-in-r-for-julia/50751/5 "2020-11-25T16:43:05Z")

</div>

I’m not sure what `str` does, but you can get help on a function called `f` from the REPL with `?f`.

---

<div class="post-metadata">

**Author:** ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Post date:** [November 25, 2020, 4:43pm UTC](https://discourse.julialang.org/t/what-is-the-equivalent-of-str-in-r-for-julia/50751/6 "2020-11-25T16:43:32Z")

</div>

For those not familiar with R, I would be nice to explain what that str() function does, that may increase the probability of someone helping!

---

<div class="post-metadata">

**Author:** ![jlapeyre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlapeyre/32/4514_2.png) [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Post date:** [November 25, 2020, 4:46pm UTC](https://discourse.julialang.org/t/what-is-the-equivalent-of-str-in-r-for-julia/50751/7 "2020-11-25T16:46:15Z")

</div>

> **[str function - RDocumentation](https://www.rdocumentation.org/packages/utils/versions/3.6.2/topics/str)**
>
> \<p\>Compactly display the internal \<b\>str\</b\>ucture of an \<span style="R"\>R\</span\> object, a
> diagnostic function and an alternative to \<code\>\<a rd-options="" href="/link/summary?package=utils&version=3.6.2"...

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [November 25, 2020, 5:18pm UTC](https://discourse.julialang.org/t/what-is-the-equivalent-of-str-in-r-for-julia/50751/8 "2020-11-25T17:18:20Z")

</div>

I’ve used `str` quite a bit in R. It’s basically a command to view the internal structure of an object (i.e. its type, value, size, and so on…). In Julia, I’d say the equivalent commands would be a combination of `dump` and `typeof`.
