I have a data frame which I need to write as a temp table in R using RPostgreSQL package.
Example:
>data(USArrests)
#Assuming that we have already established a connection to the postgres db
#Let conn be the postgres connection object
>dbWriteTable(conn, "temp_table_data", USArrests, temp.table=TRUE)
This does not work. The argument temp.table is seemingly ignored.
If there is no way out to deal with dbWriteTable, is there anyway to write a data frame as a temp table ?
USArrests:library(RPostgreSQL); library(sqldf); sqldf('select count(*) from "USArrests"'). See sqldf.googlecode.com and?sqldf.