View source: R/get_clean_sql.R
get_clean_sql | R Documentation |
This function cleans a SQL script, ready for using within R in the DfE.
get_clean_sql(filepath, additional_settings = FALSE)
filepath |
path to a SQL script |
additional_settings |
TRUE or FALSE boolean for the addition of settings at the start of the SQL script |
Cleaned string containing SQL query
# This assumes you have already set up a database connection
# and that the filepath for the function exists
# For more details see the vignette on connecting to SQL
# Pull a cleaned version of the SQL file into R
if (file.exists("your_script.sql")) {
sql_query <- get_clean_sql("your_script.sql")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.