Description Usage Arguments Value Examples
Creates a sql Query that will create a table in a SQL Database from an R dataframe. It intializes with variable types (naively), but prevents the user from manually writing the query, which can be especially cumbersome when there are many columns. Initialized with basic SQL Server variable types.
1 2 | makeSQL_createTable(df, tablename = deparse(substitute(df)),
saveQuery = NULL, wordy = T)
|
df |
data.frame we will generate a SQL create table script for |
tablename |
(optional) name of the table we want to create in a sql database |
saveQuery |
(optional) name and filepath of the .sql script that will create the table. |
wordy |
(optional) prints the sql query out to the console. |
sql query which the create table script
1 2 3 4 5 | makeSQL_createTable(mtcars)
## Not run:
makeSQL_createTable(mtcars, saveQuery='mySQL_query.sql')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.