Carlos Arias
2014-Jan-22 00:27 UTC
[R] Getting the current number of rows in windows R gui console (Carlos Arias)
Hello, I'm currently trying to set some default settings and I know how to get the width of the console with getOption("width"), this corresponds to the number of columns of the console in the Rconsole file. I would also like to get the current number of rows from inside R. Is there an R option to get this value? Thank you, Carlos Arias Statistician at ICFES Colombia [[alternative HTML version deleted]]
Duncan Murdoch
2014-Jan-22 02:12 UTC
[R] Getting the current number of rows in windows R gui console (Carlos Arias)
On 14-01-21 7:27 PM, Carlos Arias wrote:> Hello, I'm currently trying to set some default settings and I know how to > get the width of the console with getOption("width"), this corresponds to > the number of columns of the console in the Rconsole file. I would also > like to get the current number of rows from inside R. Is there an R option > to get this value? >options("width") gives you the line length that various R functions use; it doesn't necessarily tell you the window width. (Setting the window width does update the option value, but not vice versa.) There aren't functions to get window size at the R level, though you could theoretically use getWindowsHandle() to get the handle of the R console Window, and use Windows API functions to get its measurements. You can use loadRconsole() to load new settings from a file. Duncan Murdoch