R: Set or get the Window Title, or Set the Statusbar
setWindowTitle
R Documentation
Set or get the Window Title, or Set the Statusbar
Description
Set the title of the R window which will appear in the task bar, or of
the statusbar (if in use).
Usage
setWindowTitle(suffix, title = paste(getIdentification(), suffix))
getWindowTitle()
getIdentification()
setStatusBar(text)
Arguments
suffix
a character string to form part of the title
title
a character string forming the complete new title
text
a character string of up to 255 characters, to be
displayed in the status bar.
Details
setWindowTitle appends suffix to the normal window
identification (RGui, R Console or Rterm). Use
suffix = "" to reset the title.
getWindowTitle gets the current title.
This sets the title of the frame in MDI mode, the title of the console
for RGui --sdi, and the title of the window from which it was
launched for Rterm.
It has no effect in embedded uses of R.
getIdentification returns the normal window identification.
setStatusBar sets the text in the statusbar of an MDI
frame: if this is not currently shown it is selected and shown.
Value
The first three functions return a length 1 character vector.
setWindowTitle returns the previous window title (invisibly).
getWindowTitle and getIdentification return the current
window title and the normal window identification, respectively.
Note
This is only available on Windows.
Examples
## show the current working directory in the title, saving the old one
oldtitle <- setWindowTitle(getwd())
Sys.sleep(0.5)
## reset the title
setWindowTitle("")
Sys.sleep(0.5)
## restore the original title
setWindowTitle(title = oldtitle)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(utils)
> png(filename="/home/ddbj/snapshot/RGM3/R_rel/result/utils/setWindowTitle.Rd_%03d_medium.png", width=480, height=480)
> ### Name: setWindowTitle
> ### Title: Set or get the Window Title, or Set the Statusbar
> ### Aliases: setWindowTitle getWindowTitle getIdentification setStatusBar
> ### Keywords: utilities
>
> ### ** Examples
>
> ## show the current working directory in the title, saving the old one
> oldtitle <- setWindowTitle(getwd())
Error: could not find function "setWindowTitle"
Execution halted