gpt4 book ai didi

r - 使用 RPostgreSQL 从 R 中的数据框创建临时表

转载 作者:行者123 更新时间:2023-11-29 11:57:33 39 4
gpt4 key购买 nike

我有一个数据框,我需要使用 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/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com