Safely Access the RStudio API

Access the RStudio API (if available) and provide informative error messages when it's not.


News

rstudioapi 0.8

  • Added functions for installing + using build tools: buildToolsCheck(), buildToolsInstall(), buildToolsExec()

  • Added functions for installing + using themes: addTheme(), applyTheme(), convertTheme(), getThemes(), getThemeInfo().

  • Added previewSql(), for previewing output from executing a SQL query.

  • Added askForSecret(), for prompting the user to enter a password or otherwise priviledged information.

  • Fixed an issue where getActiveProject() failed for non-ASCII paths. (#86)

rstudioapi 0.7

  • Added methods for prompting the user for file paths: selectFile(), selectDirectory().

  • askForPassword() gains a default prompt (#41)

  • Add createProjectTemplate() function

  • Add setPersistentValue() / getPersistentValue() functions

  • Add methods for interacting with Terminal tab: terminalActivate(), terminalClear(), terminalCreate(), terminalList(), terminalBuffer(), terminalContext(), terminalVisible(), terminalBusy(), terminalRunning(), terminalKill(), terminalSend(), terminalExecute(), and terminalExitCode().

rstudioapi 0.6

  • Add sendToConsole function

  • Add APIs for setting cursor position in document

rstudioapi 0.5

  • Add askForPassword function

  • Add getActiveProject function

rstudioapi 0.4

  • Add API methods for interacting with a document open in RStudio: 'insertText()', 'modifyRange()' and 'getActiveDocumentContext()'.

rstudioapi 0.3

  • Add stub and documentation for sourceMarker function

rstudioapi 0.2

  • Compatibility with calling conventions for RStudio v0.99

  • Stubs and documentation for versionInfo, previewRd, and viewer functions

rstudioapi 0.1

Initial release to CRAN

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("rstudioapi")

0.9.0 by Kevin Ushey, a month ago


https://github.com/rstudio/rstudioapi


Report a bug at https://github.com/rstudio/rstudioapi/issues


Browse source code at https://github.com/cran/rstudioapi


Authors: Kevin Ushey [aut, cre] , JJ Allaire [aut] , Hadley Wickham [aut] , Gary Ritchie [aut] , RStudio [cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Suggests testthat, knitr, rmarkdown


Imported by BETS, Cite, DescToolsAddIns, DiagrammeR, EventStudy, GUIProfiler, MetaAnalyser, RepoGenerator, SpaDES.addins, TeXCheckR, Tmisc, abjutils, citr, cloudml, codebook, convertr, crypto, datapasta, debugr, devtools, discoveR, document, dplyr.teradata, dplyrAssist, editData, esquisse, fitur, furniture, getPass, ggThemeAssist, ggedit, ggplotAssist, gimmeTools, giphyr, gitgadget, goodpractice, groupedstats, htmlTable, kableExtra, kntnr, liftr, linguisticsdown, lintr, mathpix, namer, neo4r, oak, pipefittr, pkgdown, pkgload, plethem, projects, qiitr, questionr, r2d3, radiant.data, radix, rbin, remedy, rmd, rosr, rsconnect, sinew, spAddins, sparklyr, svDialogs, tensorflow, texPreview, tfruns, tidymodels, tidyverse, togglr, tribe, usethis, workflowr, zeligverse.

Depended on by RAC.

Suggested by AMR, Luminescence, RPyGeo, Rdpack, backpipe, blogdown, bookdown, civis, cliapp, clipr, colourpicker, colt, covr, crayon, crunch, datadogr, docstring, ggExtra, ipumsr, listviewer, netrankr, reprex, rgl, rhandsontable, rscala, rstan, rstantools, servr, styler, summarytools, testextra, testit, testthis, tinsel, tinytex, trackr, vdiffr, xaringan, xfun.


See at CRAN