# Reads settings from configuration file in JSON format.
#
# @param config location of file that contains configuration in JSON format
#
read.AzureSMR.config <- function(config = getOption("AzureSMR.config")){
z <- tryCatch(fromJSON(file(config)),
error = function(e)e
)
# Error check the settings file for invalid JSON
if(inherits(z, "error")) {
msg <- sprintf("Your config file contains invalid json", config)
msg <- paste(msg, z$message, sep = "\n\n")
stop(msg, call. = FALSE)
}
z
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.