Executes an arbitrary RStudio command.
The ID of the command to execute.
Whether to show an error if the command does not exist.
Most menu commands and many buttons in RStudio can be invoked from the API using this method.
quiet command governs the behavior of the function when the
command does not exist. By default, an error is shown if you attempt to
invoke a non-existent command. You should set this to
FALSE when invoking
a command that may not be available if you don't want your users to see an
The command is run asynchronously, so no status is returned.
executeCommand function was introduced in RStudio 1.2.1261.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.