#' load_data
#'
#' Function to load the data saved in the drug_data folder. Will import in the drug_data format.
#'
#'
#'
#' @return The list drug_data
#'
#' @export
load_data <- function() {
# Read all the files into a list
files <- list.files("drug_data", full.names = TRUE)
if(length(files)){
names(files) <- gsub("\\.xlsx", "", list.files("drug_data", full.names = FALSE))
files <- as.list(files)
data <- lapply(files, import_list)
message("Data loaded with success !")
return(data)
}
else{
message("No folder named 'drug_data' was found; returned NULL")
return(NULL)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.