sqlite 无法在连接的数据库上使用任何函数

z2acfund  于 2023-01-26  发布在  SQLite
关注(0)|答案(1)|浏览(131)

我无法使用连接到的. db文件中的数据:

install.packages("DBI")
install.packages("dplyr")
install.packages("RSQLite")
library(DBI)
library(RSQLite)
library(dplyr)

Hospital_db <- dbConnect(RSQLite::SQLite(),"Hospital_Data")

dbListFields(Hospital_db)

错误:

dbListFields(Hospital_db)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘dbListFields’ for signature ‘"SQLiteConnection", "missing"
x33g5p2x

x33g5p2x1#

您需要指定要在其中列出字段的表,如下所示:

dbListFields(Hospital_db, "table_name")

相关问题