sending data from R to postgreSQL

I have a data frame
1 2015-06-05
2 16:00:00
3 19
4 40
5 985
6 69
7 22

I want to send this data into my postgreSQL table. i have done all the pre-requisite stuff. The data base is connected properly. I can easily send data through dbSendQuery.
but this dataset is an object data
the command for dbSendQuery(con,”Insert into data values(‘A’,’b’,’C’)”)
Here A , b, c refers to data[1], data[2], data[3]
i want the values to be exported but it sends them as
data[1] data[2] data[3]
rather than
1 2 3

Source: ubuntu

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.