4thSpace
4thSpace

Reputation: 44352

How to show all output in Julia?

Sometimes Julia will compact output using an ellipse to save space. For example, you can run subtypes() to see this.

A while back, I saw a Julia video where the person did something to show all output and the ellipse was not there in this case. Does anyone know how this is done?

Upvotes: 11

Views: 7111

Answers (4)

datalifenyc
datalifenyc

Reputation: 2248

For IJulia (Jupyter notebook) users:

ENV["COLUMNS"] = 240

Source: DataFrames: display in a Jupyter notebook

Upvotes: 1

Andre Wildberg
Andre Wildberg

Reputation: 19191

On DataFrames you can use allrows and/or allcols:

using RDatasets

show(RDatasets.datasets(), allrows=true, allcols=true)
#763×5 DataFrame
# Row │ Package       Dataset                    Title                              Rows    #Columns 
#     │ String        String                     String                             Int64   #Int64   
#─────┼─────────────────────────────────────────────────────────────────────────────────────────────
#   1 │ COUNT         affairs                    affairs                               601       18
#   2 │ COUNT         azdrg112                   azdrg112                             1798        4
#   3 │ COUNT         azpro                      azpro                                3589        6
#   4 │ COUNT         badhealth                  badhealth                            1127        3
#   5 │ COUNT         fasttrakg                  fasttrakg                              15        9
#...

Upvotes: 4

ymhan
ymhan

Reputation: 93

here's a shorter variant of that that should work:

show(stdout, "text/plain", x)

where x is the thing you want to print

Upvotes: 8

Daniel Arndt
Daniel Arndt

Reputation: 2543

showall() no longer exists. It was remove in Julia v0.6. So the original answer to this question no longer exists. Now, you can use the following:

show(IOContext(stdout, :limit=>false), subtypes(Any))

Upvotes: 9

Related Questions