Terminal

Interact with an RStudio terminal.

terminalActivate()

Activate Terminal

terminalBuffer()

Get Terminal Buffer

terminalBusy()

Is Terminal Busy

terminalClear()

Clear Terminal Buffer

terminalContext()

Retrieve Information about RStudio Terminals

terminalCreate()

Create a Terminal

terminalExecute()

Execute Command

terminalExitCode()

Terminal Exit Code

terminalKill()

Kill Terminal

terminalList()

Get All Terminal Ids

terminalRunning()

Is Terminal Running

terminalSend()

Send Text to a Terminal

terminalVisible()

Get Visible Terminal

Documents

Interact with documents open in RStudio.

document_position() is.document_position() as.document_position()

Create a Document Position

document_range() is.document_range() as.document_range()

Create a Range

primary_selection()

Extract the Primary Selection

getActiveDocumentContext() getSourceEditorContext() getConsoleEditorContext()

Retrieve Information about an RStudio Editor

insertText() modifyRange() setDocumentContents() setCursorPosition() setSelectionRanges() documentId() documentPath() documentSave() documentSaveAll() documentNew() documentOpen() documentClose()

Interact with Documents open in RStudio

navigateToFile()

Navigate to file

R Session

Interact with the R session.

restartSession()

Restart the R Session

sendToConsole()

Send code to the R console

Dialogs

Present the user with a modal dialog.

askForPassword()

Ask the user for a password interactively

askForSecret()

Prompt user for secret

selectFile() selectDirectory()

Select a file / folder

showDialog()

Show Dialog Box

showPrompt()

Show Prompt Dialog Box

showQuestion()

Show Question Dialog Box

updateDialog()

Updates a Dialog Box

RStudio Projects

Interact with RStudio projects.

openProject() initializeProject()

Open a project in RStudio

getActiveProject()

Retrieve path to active RStudio project

Themes

Work with RStudio editor themes.

addTheme()

Add a Custom Editor Theme

applyTheme()

Apply an Editor Theme to RStudio

convertTheme()

Convert a tmTheme to an RStudio Theme

getThemeInfo()

Retrieve Themes

getThemes()

Get Theme List

removeTheme()

Remove a custom theme from RStudio.

Jobs

Interact with the jobs pane.

jobAdd()

Add a Job

jobAddOutput()

Add Background Job Output

jobAddProgress()

Add Background Job Progress

jobRemove()

Remove a Background Job

jobRunScript()

Run R Script As Background Job

jobSetProgress()

Set Background Job Progress

jobSetState()

Set Background Job State

jobSetStatus()

Set Background Job Status

Launcher

Interact with the launcher pane.

launcherAvailable()

Check if Workbench Launcher is Available

launcherConfig()

Define a Workbench Launcher Configuration

launcherContainer()

Define a Workbench Launcher Container

launcherControlJob()

Interact with (Control) a Workbench Job

launcherGetInfo()

Retrieve Workbench Launcher Information

launcherGetJob()

Retrieve Workbench Job Information

launcherGetJobs()

Retrieve Workbench Job Information

launcherHostMount()

Define a Workbench Launcher Host Mount

launcherNfsMount()

Define a Workbench Launcher NFS Mount

launcherPlacementConstraint()

Define a Workbench Launcher Placement Constraint

launcherResourceLimit()

Define a Workbench Launcher Resource Limit

launcherSubmitJob()

Submit a Workbench Job

launcherSubmitR()

Execute an R Script as a Workbench Job

Helper Functions

Other helper functions.

callFun()

Call an RStudio API function

hasFun() findFun()

Exists/get for RStudio functions

isAvailable() verifyAvailable()

Check if RStudio is running

getVersion()

Return the current version of the RStudio API

versionInfo()

RStudio version information

previewRd()

Preview an Rd topic in the Help pane

previewSql()

Preview SQL statement

readPreference()

Read Preference

readRStudioPreference()

Read RStudio Preference

writePreference()

Write Preference

writeRStudioPreference()

Write RStudio Preference

setPersistentValue() getPersistentValue()

Persistent keys and values

savePlotAsImage()

Save active RStudio plot image

sourceMarkers()

Display source markers

viewer()

View local web content within RStudio

createProjectTemplate()

Create a Project Template

hasColorConsole()

Check if console supports ANSI color escapes.

bugReport()

File an RStudio Bug Report

buildToolsCheck() buildToolsInstall() buildToolsExec()

Build Tools

dictionariesPath() userDictionariesPath()

Interact with RStudio's Dictionaries

executeCommand()

Execute Command

translateLocalUrl()

Translate Local URL

registerChunkCallback() unregisterChunkCallback()

Register and Unregister a Chunk Callback

filesPaneNavigate()

Navigate to a Directory in the Files Pane

getRStudioPackageDependencies()

Get RStudio Package Dependencies

highlightUi()

Highlight UI Elements within the RStudio IDE

isJob()

Detect RStudio Jobs

registerCommandCallback()

Register Command Callback

registerCommandStreamCallback()

Register Command Stream Callback

selectionGet() selectionSet()

Manipulate User Selections in the RStudio IDE

systemUsername()

Get System Username

unregisterCommandCallback()

Unregister Command Callback

userIdentity()

Get User Identity