我有一个数据框,我需要使用 RPostgreSQL 包在 R 中将其写为临时表。
例子:
>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)
这是行不通的。参数 temp.table 似乎被忽略了。
如果没有办法处理 dbWriteTable,是否有办法将数据框写入临时表?
最佳答案
你可以使用参数
is.temp = TRUE
并且有效
关于r - 使用 RPostgreSQL 从 R 中的数据框创建临时表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12797909/