#' @export
recreateDatabase <- function(testDatabaseFolder = NULL){
# Default to installed files
if (is.null(testDatabaseFolder)) {
testDatabaseFolder <- system.file("testDatabase", package = "festotuDbTools")
} else {
testDatabaseFolder <- normalizePath(testDatabaseFolder)
}
# drop/create the database
system(
paste(
file.path(testDatabaseFolder, "executeSQLscript.sh"),
file.path(testDatabaseFolder, "dropCreateDatabase.sql")
)
)
# load test data
loadSampleData(testDatabaseFolder)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.