so we can use cat("\f")
or cat("\014")
to send Ctrl+L to the console. I was wondering what do "\f"
and "\014"
represent. I would like to use cat()
to send other keystrokes to the console, such as Ctrl+Shift+F10.
Asked
Active
Viewed 509 times
1
-
Possibly related http://stackoverflow.com/questions/6313079/quit-and-restart-a-clean-r-session-from-within-r – Rich Scriven Oct 11 '14 at 16:58
1 Answers
0
You are not really "sending keystrokes to a console" by using cat
. You are sending character representations of them (if they exist) in most cases. Refer to the help page ?Quotes
to see which escaped characters have valid representations. I'm guessing you want to send commands to your system and there are functions that allow communication with the OS: ?system
and on windows ?shell
is also sometimes needed.

IRTFM
- 258,963
- 21
- 364
- 487