■ PostgreSQL 데이터베이스 사용하기

----------------------------------------------------------------------------------------------------

install.packages("DBI")

install.packages("RPostgreSQL")

 

library(DBI)

library(RPostgreSQL)

 

driver<-dbDriver("PostgreSQL")

 

connection<-dbConnect(drviver, host = "127.0.0.1", port = "5432", dbname = "postgres", user = "postgres", password = "1234")

 

recordSet<-dbSendQuery(connection, "select * from testr")

 

fetch(recordSet, n = -1)

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker

댓글을 달아 주세요