How to increase the number of columns using R in Linux

前端 未结 6 1014
没有蜡笔的小新
没有蜡笔的小新 2020-11-29 02:17

This may seem menial, but it affects my productivity. I am using R in terminal mode on Linux. Unlike the Windows IDE, Linux limits the number of columns to 80, thus making h

6条回答
  •  醉酒成梦
    2020-11-29 02:52

    Here is a function I have in my ~/.Rprofile file:

    wideScreen <- function(howWide=Sys.getenv("COLUMNS")) {
      options(width=as.integer(howWide))
    }
    

    Calling the function without the howWide argument sets the column to be the width of your terminal. You can optionally pass in the argument to set the width to an arbitrary number of your choosing.

    Almost like Josh's suggestion, but less magic :-)

提交回复
热议问题