lundi 7 décembre 2015

in the R SQLite package, for the function "dbWriteTable" is there a way to decare column type?

I recently asked this question.

I am able to put the whole table into the SQLite3, and am working on specifying the type. Clearly the 'r' data.frame properties imperfectly translate to SQLite3.

Question:
Using the R SQLite package, for the "dbWriteTable" is there a way to specify the type of column, particularly for boolean and date-time?

When I try writing a posixtime column using dbWriteTable:

> dbWriteTable(conn=myDBcon,name = tlist[idx],value = rt1)

then I get the following error:

Error in sqliteSendQuery(conn, statement, bind.data) : 
RAW() can only be applied to a 'raw', not a 'double'

If I treat the posixtime as a numeric, then I do not get that issue.

Aucun commentaire:

Enregistrer un commentaire