#' This function sets the working directory to the source file location.
#' Must be using RStudio
#' @param NA
#' @keywords set working directory, setwd
#' @export
#' @examples
#' setAutoWD
setAutoWD <- function(...){
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.