setWindowTitle {utils} | R Documentation

## Set or get the Window Title

### Description

Set the title of the R window which will appear in the task bar.

### Usage

    setWindowTitle(suffix, title = paste(getIdentification(), suffix))

    getWindowTitle()

    getIdentification()

### Arguments

`suffix` | a character string to form part of the title
`title` | a character string forming the complete new title

### 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.

### Value

All 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.

### 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)

[Package utils version 2.3.1 Index]