#' Initialize a shiny
#'
#' Make the directory structure and code for a lab notebook.
#'
#' @param name Name of new shiny folder.
#' @param location Path to a new shiny dashboard (from working directory)
#' @param theme Which Shiny theme you want between : "shiny_theme_1", "shiny_theme_2"
#' @export
create_shiny = function(name, theme = "shiny_theme_1", location = getwd()) {
# Create valid destination pah
location = normalizePath(location)
# Copy template to destination -------------------------------------------------------------------
destination_path = file.path(location, name)
template_path = system.file(theme, package = "toolbox")
if (file.exists(destination_path)) stop("Folder with that name already exists. Delete the existing folder or choose a different name.")
file.copy(from = template_path, to = location, recursive = TRUE)
# rename root folder
file.rename(from = file.path(location, theme),
to = file.path(location, name))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.