EVOLUTION-MANAGER
Edit File: setWindowTitle.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Set the Window Title or the Statusbar of the RGui in Windows</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for setWindowTitle {utils}"><tr><td>setWindowTitle {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Set the Window Title or the Statusbar of the RGui in Windows</h2> <h3>Description</h3> <p>Set or get the title of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> (i.e. <code>RGui</code>) window which will appear in the task bar, or set the statusbar (if in use). </p> <h3>Usage</h3> <pre> setWindowTitle(suffix, title = paste(getIdentification(), suffix)) getWindowTitle() getIdentification() setStatusBar(text) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>suffix</code></td> <td> <p>a character string to form part of the title</p> </td></tr> <tr valign="top"><td><code>title</code></td> <td> <p>a character string forming the complete new title</p> </td></tr> <tr valign="top"><td><code>text</code></td> <td> <p>a character string of up to 255 characters, to be displayed in the status bar.</p> </td></tr> </table> <h3>Details</h3> <p><code>setWindowTitle</code> appends <code>suffix</code> to the normal window identification (<code>RGui</code>, <code>R Console</code> or <code>Rterm</code>). Use <code>suffix = ""</code> to reset the title. </p> <p><code>getWindowTitle</code> gets the current title. </p> <p>This sets the title of the frame in MDI mode, the title of the console for <code>RGui --sdi</code>, and the title of the window from which it was launched for <code>Rterm</code>. It has no effect in embedded uses of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>. </p> <p><code>getIdentification</code> returns the normal window identification. </p> <p><code>setStatusBar</code> sets the text in the statusbar of an MDI frame: if this is not currently shown it is selected and shown. </p> <h3>Value</h3> <p>The first three functions return a length 1 character vector. </p> <p><code>setWindowTitle</code> returns the previous window title (invisibly). </p> <p><code>getWindowTitle</code> and <code>getIdentification</code> return the current window title and the normal window identification, respectively. </p> <h3>Note</h3> <p>These functions are only available on Windows and only make sense when using the <code>Rgui</code>. E.g., in <code>Rterm</code> (and hence in <code>ESS</code>) the title is not visible (but can be set and gotten), and in a version of <code>RStudio</code> it has been <code>""</code>, invariably. </p> <h3>Examples</h3> <pre> if(.Platform$OS.type == "windows") withAutoprint({ ## 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) }) </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>