Connecting PostgreSQL from R using RdbiPgSQL

library(RdbiPgSQL)
conn <- dbConnect(PgSQL(), host="localhost", dbname="my_database", user="my_user", password="my_secret_password")
res <- dbSendQuery(conn, "select * from prices where item_id = 29")
mydata <- dbGetResult(res)
...
dbDisconnect(conn)
Connecting PostgreSQL from R using RdbiP …
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *