Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

clearRcon

Clear the R Console / Focus on the RGui Window


Description

Clear the R console window or focus on the RGui window using Visual Basic shell scripts.

Usage

clearRcon(os=.Platform$OS.type)
focusRgui(os=.Platform$OS.type)

Arguments

os

operating system (e.g., "windows", "unix").

Details

Creates a VB shell script file called clearRcon.vbs or focusRgui.vbs in R's temporary working directory, then executes the script using the shell command.

While clearRcon clears the R console, focusRgui returns the desktop focus back to the RGui window.

These commands will only work on Windows operating platforms, using the system's executable
%SystemRoot%\system32\cscript.exe.

Author(s)

Norm Olsen, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC

See Also

Examples

## Not run: 
local(envir=.PBSmodEnv,expr={
  createWin( c("window title=Focus",
    "button text=\"Go to RGui\" width=20 bg=aliceblue func=focusRgui"), astext=T)
})

## End(Not run)

PBSmodelling

GUI Tools Made Easy: Interact with Models and Explore Data

v2.68.8
GPL (>= 2)
Authors
Jon T. Schnute [aut], Alex Couture-Beil [aut], Rowan Haigh [aut, cre], Nicholas Boers [ctb], Anisa Egeli [ctb], A. R. Kronlund [ctb], Steve Martell [ctb], Norm Olsen [ctb]
Initial release
2019-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.