data2db | R Documentation |
Write data into a database
data2db( tname, db, file, sep = "rds", overwrite = FALSE, cutoff = 0, directed = FALSE, title = NULL, note = "" )
tname |
string. The table name of the data. A table name can contain numeric alphabets and underline (e.g. table_1 ). The table name should begin with an alphabet. The 8 table names below are specified: * "edge": matrix data for network. * "dict_cui": dict of cui nodes. * "dict_codified": dict of codified nodes. * "synonyms": synonyms of cui nodes. * "rollup": rollup for cui nodes. * some other names can't be used: "details", "ids", "node". |
db |
string. The database path to write to. e.g. "./test.db". |
file |
string. The file path to read from. rds, csv, tsv, txt will be OK. |
sep |
string. Default "rds" or single character used to separate fields within a record (e.g. "\t" ",", "|", ";"). |
overwrite |
logical. Default FALSE. If TRUE, The existing table will be overwrite. |
cutoff |
float. Default 0. Parameter for "edge" data. The cutoff for matrix data of network. |
directed |
logical. Default FALSE. Parameter for "edge" data. If TRUE, the edge of the network will be with arrow. Not currently available. |
title |
string. Default NULL. Parameter for more data. The title for more information data. |
note |
string. Default "". Parameter for more data. The description for more information data. |
A sqlite3 database.
## Not run: saveRDS(data.frame("from" = 1:3, "to" = 4:6, "weight" = 7:9), "test_data2db.rds") data2db("edge", "test_data2db.db", "test_data2db.rds") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.