#' Add a readme file to the project
#'
#' Function to create a file README.md.
#'
#' @param path The path to the main folder of the project
#' @param desc The name of the project
#'
#' @return NULL invisibly
#'
#' @export
#'
add_readme <- function(path, desc){
header <- c(paste0("## ", desc), "\n")
body <- c(
"This project contains the following folders:",
"", # empty line
" * **Data**: raw data files.",
" * **Data_Processed**: processed data files.",
" * **Functions**: functions used in the project.",
" * **Graphs**: all plots generated by the scripts.",
" * **Reports**: Reports in Rmarkdown.",
"", # empty line
"<--- Here you can give a short summary of the project --->"
)
writeLines(c(header, body),
con = file.path(path,"README.md"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.