Skip to content
Back to formatted view

Raw Message

Message-ID: <200803041323.23822.elff@sowi.uni-mannheim.de>
Date: 2008-03-04T12:23:23Z
From: Martin Elff
Subject: R-Terminal
In-Reply-To: <47CD33D7.5060103@biostat.ku.dk>

On Tuesday 04 March 2008 (12:34:47), Peter Dalgaard wrote:
> Martin Kaffanke wrote:
> > Hi there!
> >
> > I use an gnome-terminal for using R.  When I resize the termial to the
> > maximum size, R uses only the left side of the window.  Can I tell R to
> > use the whole window somehow?
>
> This seems to do it:
>
> options(width=Sys.getenv("COLUMNS"))
>
> (Surprisingly, at least to me, the COLUMNS environment variable appears
> to be automagically updated by gnome-terminal even after R is started. I
> was expecting to have to play with system("tset") and suchlike.)

That seems to work also with KDE's "Konsole". 

It may be worthwile considering
to implement some automatic width-adjustment like:

.adjustwidth <- function(...){
	options(width=Sys.getenv("COLUMNS"))
	TRUE
}

addTaskCallback(.adjustwidth)

After that, the output width is adapted to the actual terminal width
each time one hits return.


Just my 20 cents.
Best,
Martin