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)
operating system (e.g., "windows"
, "unix"
).
Norm Olsen, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC
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
.
cleanWD
, clearPBSext
, clearWinVal
if (FALSE) {
local(envir=.PBSmodEnv,expr={
createWin( c("window title=Focus",
"button text=\"Go to RGui\" width=20 bg=aliceblue func=focusRgui"), astext=T)
})
}
Run the code above in your browser using DataLab