#' Insert \%do\%.
#'
#' Call this function as an addin to insert \code{ \%do\% } at the cursor position.
#'
#' @export
insertDoAddin <- function() {
stopifnot(requireNamespace("rstudioapi", quietly = TRUE))
rstudioapi::insertText(" %do% ")
}
#' Insert \%||\%.
#'
#' Call this function as an addin to insert \code{ \%||\% } at the cursor position.
#'
#' @export
insertNCAddin <- function() {
stopifnot(requireNamespace("rstudioapi", quietly = TRUE))
rstudioapi::insertText(" %||% ")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.