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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.