lundi 14 mars 2016

RSQLite, how to add column names to tables?

I have dumped several .txt files to an SQLite database on my computer's hard disk using RSQLite package. Since the .txt files have no headers, I have to use the "header = FALSE" argument. Here is how my codes look:

for (i in (1:8)) {
dbWriteTable(conn = db, name = tbls[i], value = paths[i], 
             row.names = FALSE, header = FALSE, sep = "\t", 
             overwrite = TRUE)
}

Now I want to add column names to the tables in the SQLite database, how can I do that?

Aucun commentaire:

Enregistrer un commentaire