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

Show Prompt for Secret Dialog

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

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 as an 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