Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I increase the number of columns displayed in Jupyter with R?

Tags:

r

jupyter

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:

enter image description here

The same thing happens for data.frames, or any other object that is printed in an HTML table.

How do I change this setting?

like image 786
Jonathan Avatar asked Dec 21 '16 20:12

Jonathan


1 Answers

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.

like image 63
Jonathan Avatar answered Sep 24 '22 12:09

Jonathan