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() 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 Job Output

jobAddProgress()

Add Job Progress

jobRemove()

Remove a Job

jobRunScript()

Run R Script As Job

jobSetProgress()

Set Job Progress

jobSetState()

Set Job State

jobSetStatus()

Set Job Status

Launcher

Interact with the launcher pane.

launcherGetInfo() launcherAvailable() launcherGetJobs()

Retrieve Launcher Information

launcherConfig()

Define a Launcher Configuration

launcherContainer()

Define a Launcher Container

launcherControlJob()

Interact with (Control) a Job

launcherGetJob()

Retrieve Job Information

launcherHostMount()

Define a Launcher Host Mount

launcherNfsMount()

Define a Launcher NFS Mount

launcherPlacementConstraint()

Define a Launcher Placement Constraint

launcherResourceLimit()

Define a Launcher Resource Limit

launcherSubmitJob()

Submit a Launcher Job

launcherSubmitR()

Execute an R Script as a Launcher 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