Clear the R Console / Focus on the RGui Window
Clear the R console window or focus on the RGui window using Visual Basic shell scripts.
clearRcon(os=.Platform$OS.type) focusRgui(os=.Platform$OS.type)
os
: operating system (e.g., "windows"
, "unix"
).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
.
Norm Olsen, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC
cleanWD
, clearPBSext
, clearWinVal
## 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)