I am running interactive R in terminal, however it doesn't use all of the width of the terminal. It only use 72 characters out of 226. It is very uncomfortable to read any data with a lot of columns displayed in interactive R.

I am using urxvt on debian 9,8.


See ?option:

 ‘width’: controls the maximum number of columns on a line used in
      printing vectors, matrices and arrays, and when filling by

      Columns are normally the same as characters except in East
      Asian languages.

      You may want to change this if you re-size the window that R
      is running in.  Valid values are 10...10000 with default
      normally 80.  (The limits on valid values are in file
      ‘Print.h’ and can be changed by re-compiling R.)  Some R
      consoles automatically change the value when they are

To query the value:

R> getOption("width")
[1] 80

To change the value (add this to ~/.Rprofile to change it permanently):

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.