)
}}.\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 00000002670 14446343641 015752 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 14272266044 016446 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 00000001101 14272266044 015063 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 00000000746 14272266044 015642 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 00000001170 14274213107 016407 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 Background 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 background 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}()}
}
rstudioapi/man/viewer.Rd 0000644 0001762 0000144 00000007324 14272266044 015015 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stubs.R
\name{viewer}
\alias{viewer}
\title{View local web content within RStudio}
\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[=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.}
}
\description{
View local web content within RStudio. Content can be served from static
files in the R session temporary directory, or via a web application running
on localhost.
}
\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)
# use 'viewer' option if set, or `utils::browseURL()` if unset
viewer <- getOption("viewer", default = utils::browseURL)
viewer("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/chunk-callbacks.Rd 0000644 0001762 0000144 00000002054 14272266044 016534 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chunk.R
\name{chunk-callbacks}
\alias{chunk-callbacks}
\alias{registerChunkCallback}
\alias{unregisterChunkCallback}
\title{Register and Unregister a Chunk Callback}
\usage{
registerChunkCallback(callback)
unregisterChunkCallback(id = NULL)
}
\arguments{
\item{callback}{A callback function. See \strong{Chunk Callbacks} for more details.}
\item{id}{A unique identifier.}
}
\value{
For \code{registerChunkCallback()}, a unique identifier. That identifier
can be passed to \code{unreigsterChunkCallback()} to de-register a
previously-registered callback.
}
\description{
Register a callback function to be executed after a chunk within an R
Markdown document is run.
}
\section{Chunk Callbacks}{
The \code{callback} argument should be a function accepting two parameters:
\itemize{
\item \code{chunkName}: The chunk label,
\item \code{chunkCode}: The code within the chunk.
}
The function should return an \R list of HTML outputs, to be displayed after
that chunk has been executed.
}
rstudioapi/man/jobRunScript.Rd 0000644 0001762 0000144 00000002460 14274213107 016126 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 Background 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}()}
}
rstudioapi/man/launcherGetJobs.Rd 0000644 0001762 0000144 00000002642 14332245315 016564 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/launcher-functions.R
\name{launcherGetJobs}
\alias{launcherGetJobs}
\title{Retrieve Workbench Job Information}
\usage{
launcherGetJobs(
statuses = NULL,
fields = NULL,
tags = NULL,
includeSessions = FALSE
)
}
\arguments{
\item{statuses}{Return only jobs whose status matches one of \code{statuses}.
Valid statuses are: Pending, Running, Suspended, Failed, Finished, Killed,
Canceled. When \code{NULL}, all jobs are returned.}
\item{fields}{Return a subset of fields associated with each job object.
When \code{NULL}, all fields associated with a particular job are returned.}
\item{tags}{An optional set of tags. Only jobs that have been assigned one
of these requested tags will be returned.}
\item{includeSessions}{Boolean; include jobs which are also operating
as RStudio R sessions?}
}
\description{
Retrieve information on Workbench jobs.
}
\seealso{
Other job-launcher functionality:
\code{\link{launcherAvailable}()},
\code{\link{launcherConfig}()},
\code{\link{launcherContainer}()},
\code{\link{launcherControlJob}()},
\code{\link{launcherGetInfo}()},
\code{\link{launcherGetJob}()},
\code{\link{launcherHostMount}()},
\code{\link{launcherNfsMount}()},
\code{\link{launcherPlacementConstraint}()},
\code{\link{launcherResourceLimit}()},
\code{\link{launcherSubmitJob}()},
\code{\link{launcherSubmitR}()}
}
\concept{job-launcher functionality}
rstudioapi/man/registerCommandStreamCallback.Rd 0000644 0001762 0000144 00000003114 14272266044 021421 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/commands.R
\name{registerCommandStreamCallback}
\alias{registerCommandStreamCallback}
\title{Register Command Stream Callback}
\usage{
registerCommandStreamCallback(callback)
}
\arguments{
\item{callback}{A function to execute when the command is invoked.}
}
\value{
A handle representing the registration. Pass this handle
to \code{\link{unregisterCommandCallback}} to unregister the callback.
}
\description{
Registers a callback to be executed whenever any RStudio command is invoked.
}
\details{
The callback function will be given a single argument with the ID of the
command that was invoked. See the RStudio Server Professional Administration
Guide appendix for a list of command IDs.
Note that there is a small performance penalty incurred across the IDE when
a command stream listener is present. If you only need to listen to a few
specific commands, it is recommended to set up callbacks for them individually
using \code{\link{registerCommandCallback}}.
}
\note{
The \code{registerCommandStreamCallback} function was introduced in RStudio 1.4.1589.
}
\examples{
\dontrun{
# Set up a callback to print the ID of commands executed to the console.
handle <- rstudioapi::registerCommandStreamCallback(function(id) {
message("Command executed: ", id)
})
# Later: Unregister the callback
rstudioapi::unregisterCommandCallback(handle)
}
}
\seealso{
\code{\link{unregisterCommandCallback}} to unregister the callback, and
\code{\link{registerCommandCallback}} to be notified whenever a \emph{specific} command
is executed.
}
rstudioapi/man/showQuestion.Rd 0000644 0001762 0000144 00000001300 14272266044 016210 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 00000001311 14272266044 016452 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stubs.R
\name{askForPassword}
\alias{askForPassword}
\title{Ask the user for a password interactively}
\usage{
askForPassword(prompt = "Please enter your password")
}
\arguments{
\item{prompt}{The prompt to be shown to the user.}
}
\description{
Ask the user for a password interactively.
}
\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.
}
\note{
The \code{askForPassword} function was added in version 0.99.853 of
RStudio.
}
\examples{
\dontrun{
rstudioapi::askForPassword("Please enter your password")
}
}
rstudioapi/man/navigateToFile.Rd 0000644 0001762 0000144 00000003326 14272266044 016413 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stubs.R
\name{navigateToFile}
\alias{navigateToFile}
\title{Navigate to file}
\usage{
navigateToFile(
file = character(0),
line = -1L,
column = -1L,
moveCursor = TRUE
)
}
\arguments{
\item{file}{The file to be opened.}
\item{line}{The line number where the cursor should be placed. When \code{-1L}
(the default), the cursor will not be moved.}
\item{column}{The column number where the cursour should be placed. When
\code{-1L} (the default), the cursor will not be moved.}
\item{moveCursor}{Boolean; should the cursor be moved to the requested
(\code{line}, \code{column}) position? Set this to \code{FALSE} to preserve the existing
cursor position in the document.}
}
\description{
Open a file in RStudio, optionally at a specified location.
}
\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{file} argument is empty (the default), then the file is the file
currently in view if one exists. 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. Alternatively,
\code{moveCursor} can be set to \code{FALSE} to preserve the cursor position.
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.
}
\note{
The \code{navigateToFile} function was added in version 0.99.719 of
RStudio.
}
rstudioapi/man/previewSql.Rd 0000644 0001762 0000144 00000001240 14272266044 015644 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 00000001033 14274213107 015425 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 Background Job}
\usage{
jobRemove(job)
}
\arguments{
\item{job}{The ID of the job to remove.}
}
\description{
Remove a background job from RStudio's Background 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}()}
}
rstudioapi/man/removeTheme.Rd 0000644 0001762 0000144 00000000611 14272266044 015764 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/selections.Rd 0000644 0001762 0000144 00000001176 14272266044 015663 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/selections.R
\name{selections}
\alias{selections}
\alias{selectionGet}
\alias{selectionSet}
\title{Manipulate User Selections in the RStudio IDE}
\usage{
selectionGet(id = NULL)
selectionSet(value = NULL, id = NULL)
}
\arguments{
\item{id}{The document ID. When \code{NULL} (the default), the active, or
most-recently edited, document will be used.}
\item{value}{The text contents to set for the selection.}
}
\description{
These functions allow users of the \code{rstudioapi} package to read and write
the user's current selection within the RStudio IDE.
}
rstudioapi/man/rstudio-documents.Rd 0000644 0001762 0000144 00000011453 14332245315 017175 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{documentId}
\alias{documentPath}
\alias{documentSave}
\alias{documentSaveAll}
\alias{documentNew}
\alias{documentOpen}
\alias{documentClose}
\title{Interact with Documents open in RStudio}
\usage{
insertText(location = NULL, text = NULL, id = NULL)
modifyRange(location = NULL, text = NULL, id = NULL)
setDocumentContents(text, id = NULL)
setCursorPosition(position, id = NULL)
setSelectionRanges(ranges, id = NULL)
documentId(allowConsole = TRUE)
documentPath(id = NULL)
documentSave(id = NULL)
documentSaveAll()
documentNew(
text,
type = c("r", "rmarkdown", "sql"),
position = document_position(0, 0),
execute = FALSE
)
documentOpen(path, line = -1L, col = -1L, moveCursor = TRUE)
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 requested operation
will apply to the currently open, or last focused, RStudio 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{allowConsole}{Allow the pseudo-id \verb{#console} to be returned, if the \R
console is currently focused? Set this to \code{FALSE} if you'd always like to
target the currently-active or last-active editor in the Source pane.}
\item{type}{The type of document to be created.}
\item{execute}{Should the code be executed after the document
is created?}
\item{path}{The path to the document.}
\item{line}{The line in the document to navigate to.}
\item{col}{The column in the document to navigate to.}
\item{moveCursor}{Boolean; move the cursor to the requested location after
opening the document?}
\item{save}{Whether to commit unsaved changes to the document before closing it.}
}
\description{
Use these functions to interact with documents 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 retrieve the ID of the active document using the \code{documentId()}
function.
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{documentId} and \code{documentPath} functions were added with
version 1.4.843 of RStudio.
The \code{documentNew} function was introduced in RStudio 1.2.640.
The \code{documentOpen} function was introduced in RStudio 1.4.1106.
The \code{documentClose} function was introduced in RStudio 1.2.1255
}
rstudioapi/man/unregisterCommandCallback.Rd 0000644 0001762 0000144 00000000753 14272266044 020616 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/commands.R
\name{unregisterCommandCallback}
\alias{unregisterCommandCallback}
\title{Unregister Command Callback}
\usage{
unregisterCommandCallback(handle)
}
\arguments{
\item{handle}{The registration handle to remove.}
}
\value{
\code{NULL}, invisibly.
}
\description{
Removes a previously registered command callback.
}
\note{
The \code{unregisterCommandCallback} function was introduced in RStudio 1.4.1589.
}
rstudioapi/man/registerCommandCallback.Rd 0000644 0001762 0000144 00000004251 14272266044 020250 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/commands.R
\name{registerCommandCallback}
\alias{registerCommandCallback}
\title{Register Command Callback}
\usage{
registerCommandCallback(commandId, callback)
}
\arguments{
\item{commandId}{The ID of the command to listen for.}
\item{callback}{A function to execute when the command is invoked.}
}
\value{
A handle representing the registration. Pass this handle
to \code{\link{unregisterCommandCallback}} to unregister the callback.
}
\description{
Registers a callback to be executed when an RStudio command is invoked.
}
\details{
RStudio commands can be invoked from menus, toolbars, keyboard shortcuts,
and the Command Palette, as well as the RStudio API. The callback will
be executed whenever the command is invoked, regardless of how the
invocation was triggered.
See the RStudio Server Professional Administration Guide appendix for a list
of supported command IDs.
The callback is executed \emph{after} the command has been run, but as
some commands initiate asynchronous processes, there is no guarantee that
the command has finished its work when the callback is invoked.
If you're having trouble figuring out the ID of a command you want to listen
for, it can be helpful to discover it by listening to the full command stream;
see the example in \code{\link{registerCommandStreamCallback}} for details.
Note that no error will be raised if you use a command ID that does not exist.
}
\note{
The \code{registerCommandCallback} function was introduced in RStudio 1.4.1589.
}
\examples{
\dontrun{
# Set up a callback to display an encouraging dialog whenever
# the user knits a document
handle <- rstudioapi::registerCommandCallback(
"knitDocument",
function() {
rstudioapi::showDialog(
"Achievement",
"Congratulations, you have knitted a document. Well done."
)
})
# Knit the document interactively and observe the dialog
# Later: Unregister the callback
rstudioapi::unregisterCommandCallback(handle)
}
}
\seealso{
\code{\link{unregisterCommandCallback}} to unregister the callback, and
\code{\link{registerCommandStreamCallback}} to be notified whenever \emph{any} command
is executed.
}
rstudioapi/man/readPreference.Rd 0000644 0001762 0000144 00000001464 14272266044 016425 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 00000002051 14332245315 016426 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 Workbench 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 Workbench launcher configuration, suitable for use with the \code{config}
argument to \code{\link[=launcherSubmitJob]{launcherSubmitJob()}}.
}
\seealso{
Other job-launcher functionality:
\code{\link{launcherAvailable}()},
\code{\link{launcherContainer}()},
\code{\link{launcherControlJob}()},
\code{\link{launcherGetInfo}()},
\code{\link{launcherGetJobs}()},
\code{\link{launcherGetJob}()},
\code{\link{launcherHostMount}()},
\code{\link{launcherNfsMount}()},
\code{\link{launcherPlacementConstraint}()},
\code{\link{launcherResourceLimit}()},
\code{\link{launcherSubmitJob}()},
\code{\link{launcherSubmitR}()}
}
\concept{job-launcher functionality}
rstudioapi/man/primary_selection.Rd 0000644 0001762 0000144 00000001203 14272266044 017232 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 14272266044 016155 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 00000001266 14272266044 016537 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 image}
\usage{
savePlotAsImage(
file,
format = c("png", "jpeg", "bmp", "tiff", "emf", "svg", "eps"),
width,
height
)
}
\arguments{
\item{file}{The target file path.}
\item{format}{The Image format.
Must be one of ("png", "jpeg", "bmp", "tiff", "emf", "svg", or "eps").}
\item{width}{The image width, in pixels.}
\item{height}{The image height, in pixels.}
}
\description{
Save the plot currently displayed in the Plots pane as an image.
}
\note{
The \code{savePlotAsImage} function was introduced in RStudio 1.1.57.
}
rstudioapi/man/figures/ 0000755 0001762 0000144 00000000000 14272266044 014663 5 ustar ligges users rstudioapi/man/figures/logo.png 0000644 0001762 0000144 00000052454 14272266044 016343 0 ustar ligges users PNG
IHDR q sBIT|d pHYs + tEXtSoftware www.inkscape.org< IDATxwxu_3[{#Bұ`w*yw8S^,إ#H齅H:#"Mv6;iy||3o<