RunSqlFile | R Documentation |
A helper function that loads an SQL script, updates the variables in the script to values provide and formats the resulting data by renames columns to common R style.
RunSqlFile(db.conn, file.name, variables = NA)
db.conn |
An ODBC connection to the ODBC database |
file.name |
A file name that the SQL script is saved to |
variables |
An R list of variables, variable names in the list are matched to ones with the same name in a format like %VARIABLENAME% (eg list(runid = 1) will replace %RUNID% in the SQL with 1) |
A data frame with query results
If a variable type is found that the function can't handle (e.g. a vector), the script will throw an exception.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.