I am using RPostgreSQL package to connect the db to R. I wanted to update the db with those tables do not exist in db. Is it possible to create the new table from R in postgresql and update it with upcoming values? Any suggestion?
Sample of data:
Date&Time temp
1 2007-09-30 00:00:00 -0.1153333
2 2007-09-30 01:00:00 -0.4006667
3 2007-09-30 02:00:00 -0.4493333
4 2007-09-30 03:00:00 -0.7540000
5 2007-09-30 04:00:00 -0.5783333
6 2007-09-30 05:00:00 -0.3280000
We added a number of tests for automatic conversion of types to the package, see the source tarball. In particular, the conversion of SQL Datetime to POSIXct was a prime motivation for me to get the package started (as a GSoC project).
But we may simply not writing back the same way you did here. So if it complains about a missing converter for POSIXct, try converting the POSIXct column(s) to numeric, and then provide a reproducible example on the rpostgresql mailing list (see the code.google.com repo and wiki).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With