Reputation: 2024
I am using a Jupyter notebook with an R kernel. When I print rectangular data, e.g., a matrix, it only shows me the first 10 and last 10 columns:
The same thing happens for data.frames, or any other object that is printed in an HTML table.
How do I change this setting?
Upvotes: 13
Views: 9012
Reputation: 4534
Jupiter truncates the output. But if you do
print(matrix(1:30, ncol=30))
or
df <- as.data.frame(matrix(1:30, ncol=30))
print(df)
you should get the full matrix or df output.
Upvotes: -3
Reputation: 2024
Figured it out. You can set these in options():
options(repr.matrix.max.cols=50, repr.matrix.max.rows=100)
They default to cols=20 and rows=60.
Upvotes: 25