#' Returns all files in the Data folder excluding RData
#'
#' @param dir directory of files
#' @param exclude expression based on which to remove files
#'
#' @return
#' @export
#'
#'
list_files<- function(dir, exclude = c("README", ".RData")) {
objects <- list.files(path = dir, include.dirs = F, recursive = T)
# Remove files from list
for (i in exclude) {
objects <- objects[!grepl(i, objects)]
}
return(paste(dir,
objects,
sep = ifelse(substring(dir, nchar(dir)) == "/", "", "/")))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.