knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
RStudio addins let you run R code or a Shiny app through the Rstudio IDE, either via the Addins dropdown menu or with a keyboard shortcut.
RStudio docs on addins (with examples): https://rstudio.github.io/rstudioaddins/
To use addins:
rstudioapi package v0.5 or laterinstall.packages("rstudioapi", type = "source")devtools::install_github("rstudio/addinexamples", type = "source")This package provides two menu options for changing the RStudio theme. I use a dark Monokai theme normally, but this throws students off when I an teaching, so I like to use the default Textmate theme then.
(code for this borrowed from David Severski)
view_object_addinThe view_object_addin takes selected text and pipes it into View() so you can inspect it in RStudio without typing the command in the console or finding and clicking on it in the "Environment" panel. The addin works best when you assign it a keyboard shortcut, like ctrl + shift + v.
To use this addin:
rstudioapi package (see above)devtools::install_github("andrewheiss/raddath")
I basically pilfered the template for this addin from Jenny Bryan's jadd.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.