#' Writes the first log to the directory and makes the directory if it doesn't exist
#' @importFrom readr write_csv
#' @importFrom mirroR dir_create_if_not_exist
#' @export
#'
write_log_csv <-
function(dirs_to_log) {
log_csv_filenames <- get_log_csv_fns(dirs_to_log)
for (i in 1:length(dirs_to_log)) {
dir_to_log <- dirs_to_log[i]
mirroR::dir_create_if_not_exist(dir_to_log)
}
for (i in 1:length(log_csv_filenames)) {
log_csv_filename <- log_csv_filenames[i]
if (!(file.exists(log_csv_filename))) {
dataframe <- create_log_dataframe()
readr::write_csv(dataframe, log_csv_filename)
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.