Rstudio_position_utilities: Read from/write to the current position in RStudio

Description Usage Arguments Value

Description

Utility functions for reading the current selected text and writing to the current cursor position respectively, by virtue of the rstudioapi.

These functions are used in the source code for add-ins in the RADins package.

Usage

1
2
3

Arguments

text

A character vector, each element of which is a line of text to be written to the current cursor position.

Value

The read_selected_text() function returns a character containing the active selected text in the RStudio IDE.

write_to_cursor returns NULL as it is the “side-effects” (i.e. inserting text in RStudio) that this function is useful for.


t-gummer/RADins documentation built on Sept. 14, 2020, 7:58 p.m.