为什么我会在下面继续收到此错误,
无法为函数'dbGetQuery'找到继承的方法 签名'“SQLiteConnection”,“data.frame”'
有,
# Fetch all site names.
siteQuery <- dbGetQuery(DB, "SELECT nid, title, description
FROM nodes
WHERE datatype = 'speck'
AND visible = '1'
AND nid = 'SITE'
")
# Match the pattern and replace it.
siteQuery <- sub("SITE", as.character(site1), siteQuery)
# Store the result in data.
siteData = dbGetQuery(DB, siteQuery)
我的sqlite查询或R脚本中出错了吗?我有什么想法可以解决这个问题吗?
答案 0 :(得分:-2)
# Fetch a site.
siteQuery <- "SELECT nid, title, description
FROM nodes
WHERE datatype = 'speck'
AND visible = '1'
AND nid = 'SITE'
"
# Match the pattern and replace it.
siteQuery <- sub("SITE", as.character(site1), siteQuery)
# Store the result in data.
siteData = dbGetQuery(DB, siteQuery)