RStudio_reprompt {Rdpack}R Documentation

Call reprompt based on RStudio editor contents

Description

This function uses the RStudio API to call reprompt on either the current help file in the editor, or if a name is highlighted in a ‘.R’ file, on that object.

Usage

RStudio_reprompt(verbose = TRUE)

Arguments

verbose

If TRUE print progress to console.

Details

This function depends on being run in RStudio; it will generate an error if run in other contexts.

It depends on code being in a package that has already been built, installed, and attached. In RStudio, this means you should run “Install and Restart” before running this function.

It is automatically installed into RStudio as an add-in called “Reprompt”. Whether invoked directly or through the add-in, it looks at the file currently being edited in the code editor. If it is an ‘.Rd’ file, it will run reprompt on that file.

If it is an R source file, it will look for a selected object name. It queries the help system to find if there is already a help page for that name, and if so, works on that. If not, it will try to create one.

Value

NULL, invisibly.

Author(s)

Duncan Murdoch

See Also

reprompt, prompt


[Package Rdpack version 2.6 Index]