R/new_flexdashboard.R

Defines functions new_flexdashboard

Documented in new_flexdashboard

#' @title Make new flexdashboard website
#' @description Function creates flexdasboard template to folder.
#' @param destination is folder where to create files.
#' @param overwrite overwrite existing files.
#' @author Jani Miettinen <[email protected]>
#' @return files
#' @rdname new_flexdashboard

new_flexdashboard <- function(destination = "./", overwrite = FALSE){
  # TODO Kysy, jos kansiosta löytyy samanniminen tiedosto
  file.copy(system.file("template_flexdashboard/template_flexdashboard.zip", package="bricks"), destination)
  unzip(zipfile = paste0(destination, "template_flexdashboard.zip"), exdir = destination, overwrite = overwrite)
  file.remove(paste0(destination, "template_flexdashboard.zip"))
}
janikmiet/bricks documentation built on Jan. 31, 2018, 11:54 a.m.