Speed up INSERT of 1 million+ rows into Postgres via R using COPY?
RPostgreSQL has a "CopyInDataframe" function that looks like it should do what you want:
install.packages("RPostgreSQL")library(RPostgreSQL)con <- dbConnect(PostgreSQL(), user="...", password="...", dbname="...", host="...")dbSendQuery(con, "copy foo from stdin")postgresqlCopyInDataframe(con, df)
Where table foo
has the same columns as dataframe df