10

When I put a data frame into a cell, it shows only some of the rows, with a "..." in the middle.

Edit: I'm looking for R equivalents of these Python notebook calls:

import pandas
# "If max_cols is exceeded, switch to truncate view"
pandas.set_option('display.max_columns', 5400)
# "The maximum width in characters of a column"
pandas.set_option('display.max_colwidth', 500)

See also http://pandas.pydata.org/pandas-docs/stable/generated/pandas.set_option.html.

krassowski
  • 13,598
  • 4
  • 60
  • 92
dfrankow
  • 20,191
  • 41
  • 152
  • 214
  • Try printing the output? E.g. `library(plyr); m1 <- ldply(iris, rep, 3); print(m1)` – Adam Quek Apr 13 '17 at 04:46
  • Thanks! The "print" function removes the nice HTML table formatting (lining up the values, nicer-looking fonts, table lines, ..). – dfrankow Apr 13 '17 at 12:27

1 Answers1

20

Thomas Kluyver says:

I think the options you want are repr.matrix.max.rows and repr.matrix.max.cols

i.e. run

options(repr.matrix.max.rows=600, repr.matrix.max.cols=200)

The defaults are 60 and 20.

dfrankow
  • 20,191
  • 41
  • 152
  • 214