Learn R Programming


R package spAddins

spAddins is an R package that provides a set of RStudio addins which are designed to be used in combination with user-defined RStudio keyboard shortcuts. These addins either:

  1. format text in R Markdown documents:
    • enclose either selected text or selected rows with special symbols and text gets inerpreted in a special way when rendered with R Markdown (e.g., converts "bold" into "**bold**" that is interpreted as "bold").
  2. insert text (e.g., operators %>%, <<-, %$%) at the cursor position;
  3. replace symbols in selected pieces of text (e.g., convert backslashes to forward slashes which results in strings like "c:\data\" converted into "c:/data/").

Install package

Install released version from CRAN:

install.packages("spAddins")

Install development version from GitHub:

if (!require(devtools)) install.packages("devtools")
devtools::install_github("GegznaV/spAddins")

Recommended workflow and a few examples

Get started online http://gegznav.github.io/spAddins/articles/v1_workflow.html

And offline:

vignette("v1_workflow", package = "spAddins")

More information at http://gegznav.github.io/spAddins/


Copy Link

Version

Install

install.packages('spAddins')

Monthly Downloads

161

Version

0.2.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

December 14th, 2017

Functions in spAddins (0.2.0)

rmd_list

Format text as R Markdown list
format_rmd

Add-ins for basic R Markdown formatting
rs_insert_symbol_seq

Insert a sequence of symbols
insert_magrittr_operators

Insert %>%, %<>%, %$% and %T>%
rs_insert_matrix_multiplication

Insert %*%
rmd_equations

Format as LaTeX equation
repeat_symbol

Repeat sequence of symbols
rmd_code_block

Convert rows into the block of code
insert_arrows

Insert arrow (->, ->>, <-, <<-)
rs_insert_at_row_start

Insert text at the beginning of the row
rs_insert_infix_in

Insert %in%
rs_insert_infix_R

Insert %R%
rs_replace_in_selection

Replace text in selection
rs_insert_infix_not_in

Insert %!in%
spAddins

A Set of RStudio Add-ins
replace_slash

Replace slash
rs_get_ind_first_selected_col

Get index of the first column in the selection
rs_get_ind_first_selected_row

Get index of the first row in the selection
insert_symbol_sequences

Insert various lines
rs_enclose_all_with_lines

Enclose selection with lines
rs_enclose_selection_with

Enclose selection of text with indicated symbols
rmd_headings

Format text as R Markdown headings