Displaying 11 results from an estimated 11 matches for "setwindowtitle".
2009 Oct 30
1
.Rprofile replacement function setwd() causing errors
In my .Rprofile I have the following functions which display the
current directory in the main R window title bar,
and modify base::setwd() to keep this up to date. I like this because I
can always tell where I am in the file system.
cd <- function(dir) {
base::setwd(dir)
utils::setWindowTitle( short.path(base::getwd()) )
}
short.path <- function(dir, len=2) {
np <-length(parts <- unlist(strsplit(dir, '/')))
parts <-rev( rev(parts)[1:min(np,len)] )
dots <- ifelse (np>len, '...', '')
paste(dots,paste(parts, '/', sep='&...
2012 Jul 30
1
locked binding of setwd() in R 2.15.x causes .Rprofile to fail
...anged
######################
#-- functions from .Rprofile
# modify setwd() to also show the current path in the window title
# assigns .lastdir in the global environment
local({
oldsetwd <- setwd
utils::assignInNamespace("setwd",
function(dir) {
.lastdir <<- oldsetwd(dir)
utils::setWindowTitle( short.path(base::getwd()) )
.lastdir
}, "base")
})
# setwd replacement, allowing cd() to be like 'cd -' on unix (return to
last dir)
cd <- function(dir) {
if(missing(dir)) dir <- .lastdir
.lastdir <<- base::setwd(dir)
utils::setWindowTitle( short.path(base::getwd())...
2013 Feb 07
1
assignInNamespace to create a setwd() replacement: how to use unlockBinding()?
...ry.
#### setwd-new.R ######
# .Rprofile functions to set current directory in WindowTitle
#======================
# setwd() replacement functions
#======================
oldsetwd <- base::setwd
utils::assignInNamespace("setwd",
function(dir) {
.lastdir <<- oldsetwd(dir)
utils::setWindowTitle( short.path(base::getwd()) )
.lastdir
}, "base")
# setwd replacement, allowing cd() to be like 'cd -' on unix (return to
last dir)
cd <- function(dir) {
if(missing(dir)) dir <- .lastdir
.lastdir <<- base::setwd(dir)
utils::setWindowTitle( short.path(base::getwd()) )...
2012 May 02
2
Función para devolver nombre del área de trabajo en uso
¡Hola!
¿Alguien sabe si existe una función en R que devuelve el nombre del área de trabajo (workspace) en uso si éste ha sido guardado anteriormente?
Con getwd() R me devuelve la carpeta de trabajo, pero si en ésta tengo varios áreas de trabajo guardados, p.e. a.RData y b.RData, ¿cómo podría saber en cuál estoy trabajando si por un despiste no me acordara cuál he abierto anteriormente (sin tener
2005 Sep 25
0
Tip: Working directory in titlebar
I hope others may find this useful. I use R in many different
directories. By adding the following line to the .Rprofile file:
utils:::setWindowTitle(paste("-",getwd()))
the titlebar of each R instance shows the directory from which it was
started. I have tested this with rterm.exe and rgui.exe under Windows
and with RECENT versions of R only.
-----
For changing directories during a session, I use the following function,
a slight...
2004 Jul 14
5
RGui Titlebar
In the windows version (RGui), is there a way to set
the text displayed in the titlebar of the R window?
When I have 2 instances of RGui running, it would be helpul
if the titlebar could help to understand which is which.
--
Erich Neuwirth, Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-38624 Fax: +43-1-4277-9386
2007 Jan 24
1
Useful statusbar in RGui
This may be Windows specific, so not appropriate for this List...
Currently, when I'm in console of Rgui, the status bar says a simple message
"R majer ver. minor ver. - A Language and Environment" which I know.
When I'm in plot area, it says "R Graphics" which I know, again.
I think it is very useful if statusbars says current directory,
because in my daily use I
2008 Oct 02
4
namespaces
I'd like to control my namespace thoroughly, separated by task. Is
there a way, in R session, to introduce namespaces for tasks
dynamically and switch them as needed? Or, is there a combination of
load/save workspace steps which can facilitate this?
Cheers,
Alexy
2005 Sep 06
2
help.search problem
Dear Fellow R Users,
I have recently come across a weird problem with help.search:
> help.search("tps")
Error in rbind(...) : number of columns of matrices must match (see arg 8)
>
This happens no matter what I search for...
Any thoughts ?
Thanks,
Tolga
Please follow the attached hyperlink to an important disclaimer
2004 Apr 25
5
a simple suggestion for the next version of R windows
Is it possible to replace the word "R Console" on the title bar (is it what
it's called? It's the blue area above menu bar) with the name of the work
space file you're using or loaded, so people who are runing multple R
sessions at same time can identify them immediately. I'm using 1.9.0 in SDI
mode.
Thanks,
...Tao
2004 Apr 25
5
a simple suggestion for the next version of R windows
Is it possible to replace the word "R Console" on the title bar (is it what
it's called? It's the blue area above menu bar) with the name of the work
space file you're using or loaded, so people who are runing multple R
sessions at same time can identify them immediately. I'm using 1.9.0 in SDI
mode.
Thanks,
...Tao