if (FALSE) {
# Set up a callback to print the ID of commands executed to the console.
handle <- rstudioapi::registerCommandStreamCallback(function(id) {
message("Command executed: ", id)
})
# Later: Unregister the callback
rstudioapi::unregisterCommandCallback(handle)
}
Run the code above in your browser using DataLab