# returns the current script if called from command line. Empty character string if not.
getCurrentScript <- function() {
initial.options <- commandArgs(trailingOnly = FALSE)
file.arg.name <- "--file="
script.name <- sub(file.arg.name, "", initial.options[grep(file.arg.name, initial.options)])
return(script.name)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.