) }}.\cr
Default: \code{FALSE}.}
\item{force}{Whether to force the operation and overwrite an existing file with the same
name.\cr
Default: \code{FALSE}.}
\item{globally}{Whether to install this theme for the current user or all users. If set to
\code{TRUE} this will attempt to install the theme for all users, which may
require administrator privileges.\cr
Default: \code{FALSE}.}
}
\description{
Adds a custom editor theme to RStudio and returns the name of the newly added theme.
}
\note{
The \code{addTheme} function was introduced in RStudio 1.2.879.
}
rstudioapi/man/build-tools.Rd 0000644 0001762 0000144 00000002653 13574017651 015753 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build-tools.R
\name{build-tools}
\alias{build-tools}
\alias{buildToolsCheck}
\alias{buildToolsInstall}
\alias{buildToolsExec}
\title{Build Tools}
\usage{
buildToolsCheck()
buildToolsInstall(action)
buildToolsExec(expr)
}
\arguments{
\item{action}{The action (as a string) being taken that will require
installation of build tools.}
\item{expr}{An \R expression (unquoted) to be executed with build tools
available and on the \code{PATH}.}
}
\description{
Check, install, and use build tools as required.
}
\details{
These functions are intended to be used together -- one should
first check whether build tools are available, and when not,
prompt for installation. For example:\if{html}{\out{}}\preformatted{compile_model <- function(...) \{
if (rstudioapi::isAvailable()) \{
if (!rstudioapi::buildToolsCheck())
rstudioapi::buildToolsInstall("Model compilation")
rstudioapi::buildToolsExec(\{
# code requiring build tools here
\})
\}
\}
}\if{html}{\out{
}}
The \code{action} parameter is used to communicate (with a prompt) the operation
being performed that requires build tool installation. Setting it to \code{NULL}
or the empty string will suppress that prompt.
}
\note{
The \code{buildToolsCheck()}, \code{buildToolsInstall()}, and \code{buildToolsExec()}
functions were added with version 1.2.962 of RStudio.
}
rstudioapi/man/terminalBuffer.Rd 0000644 0001762 0000144 00000001301 13535525640 016447 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/terminal.R
\name{terminalBuffer}
\alias{terminalBuffer}
\title{Get Terminal Buffer}
\usage{
terminalBuffer(id, stripAnsi = TRUE)
}
\arguments{
\item{id}{The terminal id. The \code{id} is obtained from
\code{\link{terminalList}()}, \code{\link{terminalVisible}()},
\code{\link{terminalCreate}()}, or \code{\link{terminalExecute}()}.}
\item{stripAnsi}{If FALSE, don't strip out Ansi escape sequences before returning
terminal buffer.}
}
\value{
The terminal contents, one line per row.
}
\description{
Returns contents of a terminal buffer.
}
\note{
The \code{terminalBuffer} function was added in version 1.1.350 of RStudio.
}
rstudioapi/man/callFun.Rd 0000644 0001762 0000144 00000001077 13535525640 015100 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/code.R
\name{callFun}
\alias{callFun}
\title{Call an RStudio API function}
\usage{
callFun(fname, ...)
}
\arguments{
\item{fname}{name of the RStudio function to call.}
\item{...}{Other arguments passed on to the function}
}
\description{
This function will return an error if RStudio is not running, or the
function is not available. If you want to fall back to different
behavior, use \code{\link{hasFun}}.
}
\examples{
if (rstudioapi::isAvailable()) {
rstudioapi::callFun("versionInfo")
}
}
rstudioapi/man/getVersion.Rd 0000644 0001762 0000144 00000000744 13535525640 015641 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/code.R
\name{getVersion}
\alias{getVersion}
\title{Return the current version of the RStudio API}
\usage{
getVersion()
}
\value{
A \code{\link{numeric_version}} which you can compare to a string
and get correct results.
}
\description{
Return the current version of the RStudio API
}
\examples{
\dontrun{
if (rstudioapi::getVersion() < "0.98.100") {
message("Your version of RStudio is quite old")
}
}
}
rstudioapi/man/jobAddProgress.Rd 0000644 0001762 0000144 00000001162 13574017651 016420 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jobs.R
\name{jobAddProgress}
\alias{jobAddProgress}
\title{Add Job Progress}
\usage{
jobAddProgress(job, units)
}
\arguments{
\item{job}{The ID of the job to update progress for.}
\item{units}{The integer number of new progress units completed.}
}
\description{
Adds incremental progress units to a job.
}
\seealso{
Other jobs:
\code{\link{jobAddOutput}()},
\code{\link{jobAdd}()},
\code{\link{jobRemove}()},
\code{\link{jobRunScript}()},
\code{\link{jobSetProgress}()},
\code{\link{jobSetState}()},
\code{\link{jobSetStatus}()}
}
\concept{jobs}
rstudioapi/man/viewer.Rd 0000644 0001762 0000144 00000007443 13535525640 015020 0 ustar ligges users \name{viewer}
\alias{viewer}
\title{
View local web content within RStudio
}
\description{
View local web content within RStudio. Content can be served from static files in the R session temporary directory or can be a \link[shiny:shiny-package]{Shiny}, \link[Rook:Rook-package]{Rook}, \link[opencpu:opencpu]{OpenCPU}, or any other type of localhost web application.
}
\usage{
viewer(url, height = NULL)
}
\arguments{
\item{url}{Application URL. This can be either a localhost URL or a path to a file within the R session temporary directory (i.e. a path returned by \code{\link[base:tempfile]{tempfile}}).
}
\item{height}{Desired height. Specifies a desired height for the Viewer pane (the default is \code{NULL} which makes no change to the height of the pane). This value can be numeric or the string \code{"maximize"} in which case the Viewer will expand to fill all vertical space. See details below for a discussion of constraints imposed on the height.
}
}
\details{
RStudio also sets the global \code{viewer} option to the \code{rstudioapi::viewer} function so that it can be invoked in a front-end independent manner.
Applications are displayed within the Viewer pane. The application URL must either be served from localhost or be a path to a file within the R session temporary directory. If the URL doesn't conform to these requirements it is displayed within a standard browser window.
The \code{height} parameter specifies a desired height, however it's possible the Viewer pane will end up smaller if the request can't be fulfilled (RStudio ensures that the pane paired with the Viewer maintains a minimum height). A height of 400 pixels or lower is likely to succeed in a large proportion of configurations.
A very large height (e.g. 2000 pixels) will allocate the maximum allowable space for the Viewer (while still preserving some view of the pane above or below it). The value \code{"maximize"} will force the Viewer to full height. Note that this value should only be specified in cases where maximum vertical space is essential, as it will result in one of the user's other panes being hidden.
}
\note{
The \code{viewer} function was added in version 0.98.423 of RStudio. The ability to specify \code{maximize} for the \code{height} parameter was introduced in version 0.99.1001 of RStudio.
}
\section{Viewer Detection}{
When a page is displayed within the Viewer it's possible that the user will choose to pop it out into a standalone browser window. When rendering inside a standard browser you may want to make different choices about how content is laid out or scaled. Web pages can detect that they are running inside the Viewer pane by looking for the \code{viewer_pane} query parameter, which is automatically injected into URLs when they are shown in the Viewer. For example, the following URL:
\preformatted{
http://localhost:8100
}
When rendered in the Viewer pane is transformed to:
\preformatted{
http://localhost:8100?viewer_pane=1
}
To provide a good user experience it's strongly recommended that callers take advantage of this to automatically scale their content to the current size of the Viewer pane. For example, re-rendering a JavaScript plot with new dimensions when the size of the pane changes.
}
\examples{
\dontrun{
# run an application inside the IDE
rstudioapi::viewer("http://localhost:8100")
# run an application and request a height of 500 pixels
rstudioapi::viewer("http://localhost:8100", height = 500)
# probe for viewer option then fall back to browseURL
viewer <- getOption("viewer")
if (!is.null(viewer))
viewer("http://localhost:8100")
else
utils::browseURL("http://localhost:8100")
# generate a temporary html file and display it
dir <- tempfile()
dir.create(dir)
htmlFile <- file.path(dir, "index.html")
# (code to write some content to the file)
rstudioapi::viewer(htmlFile)
}
} rstudioapi/man/jobRunScript.Rd 0000644 0001762 0000144 00000002465 13574017651 016143 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jobs.R
\name{jobRunScript}
\alias{jobRunScript}
\title{Run R Script As Job}
\usage{
jobRunScript(
path,
name = NULL,
encoding = "unknown",
workingDir = NULL,
importEnv = FALSE,
exportEnv = ""
)
}
\arguments{
\item{path}{The path to the R script to be run.}
\item{name}{A name for the background job. When \code{NULL} (the default), the filename of the
script is used as the job name.}
\item{encoding}{The text encoding of the script, if known.}
\item{workingDir}{The working directory in which to run the job. When \code{NULL} (the default),
the parent directory of the R script is used.}
\item{importEnv}{Whether to import the global environment into the job.}
\item{exportEnv}{The name of the environment in which to export the R objects created by the
job. Use \code{""} (the default) to skip export, \code{"R_GlobalEnv"}` to export to the
global environment, or the name of an environment object to create an object with that name.}
}
\description{
Starts an R script as a background job.
}
\seealso{
Other jobs:
\code{\link{jobAddOutput}()},
\code{\link{jobAddProgress}()},
\code{\link{jobAdd}()},
\code{\link{jobRemove}()},
\code{\link{jobSetProgress}()},
\code{\link{jobSetState}()},
\code{\link{jobSetStatus}()}
}
\concept{jobs}
rstudioapi/man/showQuestion.Rd 0000644 0001762 0000144 00000001300 13535525640 016211 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dialogs.R
\name{showQuestion}
\alias{showQuestion}
\title{Show Question Dialog Box}
\usage{
showQuestion(title, message, ok = NULL, cancel = NULL)
}
\arguments{
\item{title}{The title to display in the dialog box.}
\item{message}{A character vector with the contents to display in
the main dialog area.}
\item{ok}{And optional character vector that overrides the caption for
the OK button.}
\item{cancel}{An optional character vector that overrides the caption for
the Cancel button.}
}
\description{
Shows a dialog box asking a question.
}
\note{
The \code{showQuestion} function was added in version 1.1.67 of RStudio.
}
rstudioapi/man/askForPassword.Rd 0000644 0001762 0000144 00000001174 13535525640 016462 0 ustar ligges users \name{askForPassword}
\alias{askForPassword}
\title{
Ask the user for a password interactively
}
\description{
Ask the user for a password interactively.
}
\note{
The \code{askForPassword} function was added in version 0.99.853 of RStudio.
}
\usage{
askForPassword(prompt)
}
\arguments{
\item{prompt}{Single element character vector containing the prompt to be displayed}
}
\details{
RStudio also sets the global \code{askpass} option to the \code{rstudioapi::askForPassword} function so that it can be invoked in a front-end independent manner.
}
\examples{
\dontrun{
rstudioapi::askForPassword("Please enter your password")
}
}
rstudioapi/man/navigateToFile.Rd 0000644 0001762 0000144 00000002204 13535525640 016406 0 ustar ligges users \name{navigateToFile}
\alias{navigateToFile}
\title{
Navigate to File
}
\description{
Open a file in RStudio, optionally at a specified location.
}
\note{
The \code{navigateToFile} function was added in version 0.99.719 of RStudio.
}
\usage{
navigateToFile(file, line = -1L, column = -1L)
}
\arguments{
\item{file}{Path to the file to open)}
\item{line}{Optional; integer specifying the line number on which to place the cursor}
\item{column}{Optional; integer specifying the column number on which to place the cursor}
}
\details{
The \code{navigateToFile} opens a file in RStudio. If the file is already open, its tab or window is activated.
Once the file is open, the cursor is moved to the specified location. If the \code{line}
and \code{column} arguments are both equal to \code{-1L} (the default), then
the cursor position in the document that is opened will be preserved.
Note that if your intent is to navigate to a particular function within a file, you can also cause RStudio to navigate there by invoking \code{\link[utils]{View}} on the function, which has the advantage of falling back on deparsing if the file is not available.
}
rstudioapi/man/previewSql.Rd 0000644 0001762 0000144 00000001240 13535525640 015645 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preview.R
\name{previewSql}
\alias{previewSql}
\title{Preview SQL statement}
\usage{
previewSql(conn, statement, ...)
}
\arguments{
\item{conn}{The 'DBI' connection to be used to execute this statement.}
\item{statement}{The SQL statement to execute. Either a path to a
file containing a SQL statement or the SQL statement itself.}
\item{...}{Additional arguments to be used in \code{dbGetQuery()}.}
}
\description{
Makes use of 'DBI' and \code{dbGetQuery()} to preview a SQL statement
for a given 'DBI' connection.
}
\note{
The \code{previewSql} function was introduced in RStudio 1.2.600
}
rstudioapi/man/jobRemove.Rd 0000644 0001762 0000144 00000001012 13574017651 015432 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jobs.R
\name{jobRemove}
\alias{jobRemove}
\title{Remove a Job}
\usage{
jobRemove(job)
}
\arguments{
\item{job}{The ID of the job to remove.}
}
\description{
Remove a job from RStudio's Jobs pane.
}
\seealso{
Other jobs:
\code{\link{jobAddOutput}()},
\code{\link{jobAddProgress}()},
\code{\link{jobAdd}()},
\code{\link{jobRunScript}()},
\code{\link{jobSetProgress}()},
\code{\link{jobSetState}()},
\code{\link{jobSetStatus}()}
}
\concept{jobs}
rstudioapi/man/removeTheme.Rd 0000644 0001762 0000144 00000000611 13535525640 015765 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/themes.R
\name{removeTheme}
\alias{removeTheme}
\title{Remove a custom theme from RStudio.}
\usage{
removeTheme(name)
}
\arguments{
\item{name}{The unique name of the theme to remove.}
}
\description{
Remove a custom theme from RStudio.
}
\note{
The \code{removeTheme} function was introduced in RStudio 1.2.879.
}
rstudioapi/man/rstudio-documents.Rd 0000644 0001762 0000144 00000010253 13574017651 017201 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/document-api.R
\name{rstudio-documents}
\alias{rstudio-documents}
\alias{insertText}
\alias{modifyRange}
\alias{setDocumentContents}
\alias{setCursorPosition}
\alias{setSelectionRanges}
\alias{documentSave}
\alias{documentSaveAll}
\alias{documentNew}
\alias{documentClose}
\title{Interact with Documents open in RStudio}
\usage{
insertText(location, text, id = NULL)
modifyRange(location, text, id = NULL)
setDocumentContents(text, id = NULL)
setCursorPosition(position, id = NULL)
setSelectionRanges(ranges, id = NULL)
documentSave(id = NULL)
documentSaveAll()
documentNew(
text,
type = c("r", "rmarkdown", "sql"),
position = document_position(0, 0),
execute = FALSE
)
documentClose(id = NULL, save = TRUE)
}
\arguments{
\item{location}{An object specifying the positions, or ranges, wherein
text should be inserted. See \bold{Details} for more information.}
\item{text}{A character vector, indicating what text should be
inserted at each aforementioned range. This should either
be length one (in which case, this text is applied to each
range specified); otherwise, it should be the same length
as the \code{ranges} list.}
\item{id}{The document id. When \code{NULL} or blank,
the mutation will apply to the currently open, or last
focused, RStudio document. Use the \code{id} returned
from \code{\link{getActiveDocumentContext}()} to ensure
that the operation is applied on the intended document.}
\item{position}{The cursor position, typically created through
\code{\link{document_position}()}.}
\item{ranges}{A list of one or more ranges, typically created
through \code{\link{document_range}()}.}
\item{type}{The type of document to be created.}
\item{execute}{Should the code be executed after the document
is created?}
\item{save}{Whether to commit unsaved changes to the document before closing it.}
}
\description{
Use these functions to interact with documents open in RStudio.
Creates a new document in RStudio
Closes a document currently open in RStudio.
}
\details{
\code{location} should be a (list of) \code{\link{document_position}} or
\code{\link{document_range}} object(s), or numeric vectors coercable to
such objects.
To operate on the current selection in a document, call \code{insertText()}
with only a text argument, e.g.
\preformatted{
insertText("# Hello\\n")
insertText(text = "# Hello\\n")
}
Otherwise, specify a (list of) positions or ranges, as in:
\preformatted{
# insert text at the start of the document
insertText(c(1, 1), "# Hello\\n")
# insert text at the end of the document
insertText(Inf, "# Hello\\n")
# comment out the first 5 rows
pos <- Map(c, 1:5, 1)
insertText(pos, "# ")
# uncomment the first 5 rows, undoing the previous action
rng <- Map(c, Map(c, 1:5, 1), Map(c, 1:5, 3))
modifyRange(rng, "")
}
\code{modifyRange} is a synonym for \code{insertText}, but makes its intent
clearer when working with ranges, as performing text insertion with a range
will replace the text previously existing in that range with new text. For
clarity, prefer using \code{insertText} when working with
\code{\link{document_position}}s, and \code{modifyRange} when working with
\code{\link{document_range}}s.
\code{documentClose} accepts an ID of an open document rather than a path.
You can get the ID of an open document from the
\code{getSourceEditorContext} function, among others.
Closing is always done non-interactively; that is, no prompts are given to
the user. If the user has made changes to the document but not saved them,
then the \code{save} parameter governs the behavior: when \code{TRUE},
unsaved changes are committed, and when \code{FALSE} they are discarded.
}
\note{
The \code{insertText}, \code{modifyRange} and \code{setDocumentContents}
functions were added with version 0.99.796 of RStudio.
The \code{setCursorPosition} and \code{setSelectionRanges} functions were
added with version 0.99.1111 of RStudio.
The \code{documentSave} and \code{documentSaveAll} functions were added
with version 1.1.287 of RStudio.
The \code{documentNew} function was introduced in RStudio 1.2.640
The \code{documentClose} function was introduced in RStudio 1.2.1255
}
rstudioapi/man/readPreference.Rd 0000644 0001762 0000144 00000001464 13535525640 016426 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prefs.R
\name{readPreference}
\alias{readPreference}
\title{Read Preference}
\usage{
readPreference(name, default)
}
\arguments{
\item{name}{The name of the preference.}
\item{default}{The default value to use when the preference is not available.}
}
\description{
Reads a user preference, useful to remember preferences across different R
sessions for the same user.
}
\details{
User preferences can have arbitrary names and values. You must write
the preference with \code{\link{writePreference}} before it can be read
(otherwise its default value will be returned).
}
\note{
The \code{readPreference} function was added in version 1.1.67 of
RStudio.
}
\seealso{
\code{\link{readRStudioPreference}}, which reads RStudio IDE
preferences.
}
rstudioapi/man/launcherConfig.Rd 0000644 0001762 0000144 00000001524 13574017651 016441 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/launcher-functions.R
\name{launcherConfig}
\alias{launcherConfig}
\title{Define a Launcher Configuration}
\usage{
launcherConfig(name, value = NULL)
}
\arguments{
\item{name}{The name of the launcher configuration.}
\item{value}{The configuration value. Must either be an integer, float, or string.}
}
\description{
Define a launcher configuration, suitable for use with the \code{config} argument
to \code{\link[=launcherSubmitJob]{launcherSubmitJob()}}.
}
\seealso{
Other job submission:
\code{\link{launcherContainer}()},
\code{\link{launcherHostMount}()},
\code{\link{launcherNfsMount}()},
\code{\link{launcherPlacementConstraint}()},
\code{\link{launcherResourceLimit}()},
\code{\link{launcherSubmitJob}()},
\code{\link{launcherSubmitR}()}
}
\concept{job submission}
rstudioapi/man/primary_selection.Rd 0000644 0001762 0000144 00000001203 13535525640 017233 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/document-methods.R
\name{primary_selection}
\alias{primary_selection}
\title{Extract the Primary Selection}
\usage{
primary_selection(x, ...)
}
\arguments{
\item{x}{A document context, or a selection.}
\item{...}{Optional arguments (currently ignored).}
}
\description{
By default, functions returning a document context will
return a list of selections, including both the 'primary'
selection and also 'other' selections (e.g. to handle the
case where a user might have multiple cursors active).
Use \code{primary_selection()} to extract the primary
selection.
}
rstudioapi/man/terminalList.Rd 0000644 0001762 0000144 00000000640 13535525640 016156 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/terminal.R
\name{terminalList}
\alias{terminalList}
\title{Get All Terminal Ids}
\usage{
terminalList()
}
\value{
The terminal identifiers as a character vector.
}
\description{
Return a character vector containing all the current terminal identifiers.
}
\note{
The \code{terminalList} function was added in version 1.1.350 of RStudio.
}
rstudioapi/man/savePlotAsImage.Rd 0000644 0001762 0000144 00000001210 13574017651 016526 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stubs.R
\name{savePlotAsImage}
\alias{savePlotAsImage}
\title{Save Active RStudio Plot as an Image}
\usage{
savePlotAsImage(
file,
format = c("png", "jpeg", "bmp", "tiff", "emf", "svg", "eps"),
width,
height
)
}
\arguments{
\item{file}{Target filename}
\item{format}{Image format ("png", "jpeg", "bmp", "tiff", "emf", "svg", or "eps")}
\item{width}{Image width in pixels}
\item{height}{Image height in pixels}
}
\description{
Save the currnently active RStudio as an image file.
}
\note{
The \code{savePlotAsImage} function was introduced in RStudio 1.1.57
}
rstudioapi/man/figures/ 0000755 0001762 0000144 00000000000 13575747142 014673 5 ustar ligges users rstudioapi/man/figures/logo.png 0000644 0001762 0000144 00000052424 13535525640 016341 0 ustar ligges users PNG
IHDR q sBIT|d pHYs + tEXtSoftware www.inkscape.org< IDATxu|g3qw#@Z~r'\(TNn!@<ij>?R
!f'Ƽ_/`>ߝ<Nl8f,IA51Vx
P>1K&H:3xԼ~ʒKETw"u$_\VIA[0EQEtxBx
0
kiƪK*NEaTwhf1Coy ڃ($Y-lSi%TwPt
D
FxvMʨ"`LXgk-,IAx1w?WEITw-i|VxRc{3jGK"nH~ܲ?/ rZj,=ŎXjzJOZ2&
$J롊l(Jo q0$$cZXW$(pݺ)jj"nL\fYhM
+icSoVo>atF5I`NpTTM&,4 ]_JKIm-3uSP"nckT9D+a)*.%*2?難xo6j߾Z#9x=[x
UmŨE!f6p4=S3,MS"/-ԳCyzXSfۨ"nmƭ%4*HI#(eB'dbvHҋET-D
]N;=\'X+dkhpjc+p3D)c
4WХ탋剼@e5PE`&I^Df`x}\1Ԇ:+ixeryIP*H*72&B`vZ۹ؕ"z-dh1d>;iJvK$Dpl'/q
ZcYc!-$̓yݰU-eB_AiFhul=E:^/ j~_fV)aۅ*`do]g.,ޥ%zʪeR'Izƴ~jȣg" OC5"\1ƃZv١4'z>ߠ*3õ [xH
y*b[nŃa]hٕ#[dk3~!<(Q(