RStudio Addin Manager

{rsam} provides a command line and user interface to manage RStudio addins.

Installation

remotes::install_github('yonicd/rsam')

UI

library(rsam)

rsam()

CLI

Retrieve Summary of Installed Addins

fetch_addins()
PackageNameBindingInteractiveKeyShortcut
blogdownServe Siteserve_sitetrueblogdown::serve_site
blogdownNew Postnew_post_addintrueblogdown::new_post_addin
blogdownUpdate Metadataupdate_meta_addintrueblogdown::update_meta_addin
bookdownPreview Bookserve_booktruebookdown::serve_book
bookdownInput LaTeX Mathmathquilltruebookdown::mathquill
chunkychunkychunkifyfalsechunky::chunkify
cliprValue to clipboardclipr_resultfalseclipr::clipr_result
cliprOutput to clipboardclipr_outputfalseclipr::clipr_output
colourpickerPlot Colour HelperplotHelperAddintruecolourpicker::plotHelperAddin
colourpickerColour PickercolourPickerAddintruecolourpicker::colourPickerAddin
covrCalculate package test coverageaddin_reportfalsecovr::addin_report
cronRSchedule R scripts on Linux/Unixcron_rstudioaddintruecronR::cron_rstudioaddin
ggeditggeditggeditAddintrueggedit::ggeditAddin
remedyBacktickbacktickrfalseremedy::backtickrCtrl+Cmd+`
remedyBoldboldrfalseremedy::boldrCtrl+Cmd+B
remedyChunkchunkrfalseremedy::chunkrCtrl+Alt+Cmd+C
remedyChunksplitchunksplitrfalseremedy::chunksplitrCtrl+Shift+Alt+C
remedyH1h1rfalseremedy::h1rCtrl+Cmd+1
remedyH2h2rfalseremedy::h2rCtrl+Cmd+2
remedyH3h3rfalseremedy::h3rCtrl+Cmd+3
remedyH4h4rfalseremedy::h4rCtrl+Cmd+4
remedyH5h5rfalseremedy::h5rCtrl+Cmd+5
remedyH6h6rfalseremedy::h6rCtrl+Cmd+6
remedyHtmlcommenthtmlcommentrfalseremedy::htmlcommentrCtrl+Alt+C
remedyImageimagerfalseremedy::imagerCtrl+Cmd+P
remedyItalicsitalicsrfalseremedy::italicsrCtrl+Cmd+I
remedyLaTeXlatexrfalseremedy::latexrCtrl+Cmd+L
remedyListlistrfalseremedy::listrCtrl+Shift+Cmd+=
remedyRightrightrfalseremedy::rightrAlt+Cmd+Right
remedyStrikestrikerfalseremedy::strikerCtrl+Cmd+S
remedyTabletablerfalseremedy::tablerCtrl+Cmd+T
remedyUrlurlrfalseremedy::urlrCtrl+Cmd+U
remedyXaringanxaringanrfalseremedy::xaringanrCtrl+Cmd+X
remedyYoutubeyoutuberfalseremedy::youtuberCtrl+Cmd+Y
reprexRender reprexreprex_addintruereprex::reprex_addin
rhandsontableEdit a Data FrameeditAddintruerhandsontable::editAddin
rsamlla1lla1truersam::lla1
rsamlla2lla2truersam::lla2
rsamlla3lla3truersam::lla3
shinyjsColour PickercolourPickerAddintrueshinyjs::colourPickerAddin
sinewcreateOxygenoxygenAddinfalsesinew::oxygenAddin
sinewinteractiveOxygeninterOxyAddIntruesinew::interOxyAddIn
stylerStyle packagestyle_pkgtruestyler::style_pkg
stylerStyle active filestyle_active_filetruestyler::style_active_file
stylerStyle selectionstyle_selectiontruestyler::style_selection
texPreviewtexPreviewtexAddinfalsetexPreview::texAddin
vcsalexaalexatruevcs::alexa

Building Keyboard Shortcuts

rsam has a validation for keyboard keys through the class key


KEYS$`left command/window key`
#> [1] "Command"
#> attr(,"class")
#> [1] "character" "key"

KEYS$shift
#> [1] "Shift"
#> attr(,"class")
#> [1] "character" "key"

KEYS$i
#> [1] "I"
#> attr(,"class")
#> [1] "character" "key"

key <- KEYS$`left command/window key` + KEYS$shift + KEYS$i

key
#> [1] "Command+Shift+I"

Set Keyboard Shortcut for Addins


set_shortcut(fn = 'blogdown::serve_site',shortcut = key)

#if the binding already has a shortcut mapped to it `overide` must be TRUE
set_shortcut(fn = 'blogdown::serve_site',shortcut = key, overide = TRUE)

Remove Keyboard Shortcut for Addins

rm_shortcut(fn = 'blogdown::serve_site')

Toggle Addins on/off

Every time a binding is passed to the toggle_addin function it will switch states.

toggle_addin(key = c("blogdown::serve_site","blogdown::new_post_addin","blogdown::update_meta_addin"))

Limited Liability Addins

rsam gives you 3 empty addins to pass into them whatever you want and run them as your personal addins. You can also set keyboard shortcuts for each one with set_shortcut.

Pass through an expression wrapped the global objects rsam_fn_1(), rsam_fn_2(), and rsam_fn_3() into the Rstudio Addin list.


rsam_fn_1 <- function(){
  library(ggplot2)
  library(dplyr)
  
  iris%>%ggplot(aes(x=Sepal.Length,y=Sepal.Width)) + geom_point()
}

# Change shortcuts to whatever you want

keys <- KEYS$`left command/window key` + KEYS$shift + KEYS$l

rsam::set_shortcut(fn = 'rsam::lla1',shortcut = keys + KEYS$`1`)

rsam::set_shortcut(fn = 'rsam::lla2',shortcut = keys + KEYS$`2`)

rsam::set_shortcut(fn = 'rsam::lla3',shortcut = keys + KEYS$`3`)

Feedbacks and enhancement

You've found a bug, or have an enhancment idea? Feel free to open an issue : https://github.com/yonicd/rsam/issues.

Copy Link

Version

Down Chevron

Install

install.packages('rsam')

Monthly Downloads

10

Version

0.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

January 8th, 2018

Functions in rsam (0.1.0)