Description Usage Arguments Details Examples
Given a file name, makeSQLDataFrame will write
the file contents into SQLite database, and open the database
table as SQLDataFrame.
1 2 |
filename |
A |
dbkey |
A character vector of column name(s) that could uniquely identify each row of the filename. Must be provided in order to construct a SQLDataFrame. |
dbname |
A character string of the filepath of to-be-saved
database file. If not provided, will use a
|
dbtable |
A character string for the to be saved database
table name. If not provided, will use the name of the input
|
overwrite |
Whether to overwrite the |
sep |
a character string to separate the terms. Not
‘NA_character_’. Default is |
The provided file must has one or more columns to unique identify each row (no duplicate rows allowed). The file must be rectangular without rownames. (if rownames are needed, save it as a column.)
1 2 3 4 5 6 7 8 9 10 11 | mtc <- tibble::rownames_to_column(mtcars)
## data.frame input
obj <- makeSQLDataFrame(mtc, dbkey = "rowname")
obj
## character input
filename <- file.path(tempdir(), "mtc.csv")
write.csv(mtc, file= filename, row.names = FALSE)
obj <- makeSQLDataFrame(filename, dbkey = "rowname")
obj
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.