0
我想在R中建立一個MySQL數據庫。我已經安裝了RMySQL併成功建立連接。我能夠成功地使用dbWriteTable()
功能爲好,但是當我嘗試使用dbListTables()
它給了我一個錯誤說dbListTable函數錯誤
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘dbListTables’ for signature ‘"missing"
任何人都可以闡明這一些輕? 繼承人代碼:
#Install and load Quandl package
install.packages("Quandl")
library(Quandl)
#Install and load SQL package
install.packages("RMySQL")
library(RMySQL)
#Authenicate API key
Quandl.api_key("________")
#Load top 10 biggest Healthcare compaines in Fortune 500 according to
#http://fortune.com/2015/06/20/fortune-500-biggest-healthcare-companies/
CVS <- Quandl("WIKI/CVS")
McKesson <- Quandl("WIKI/MCK")
UnitedHealthGroup <- Quandl("WIKI/UNH")
AmerisourceBergern <- Quandl("WIKI/ABC")
ExpressScriptsHolding <- Quandl("WIKI/ESRX")
CardinalHealth <- Quandl("WIKI/CAH")
Walgreens <- Quandl("WIKI/WBA")
Johnson_Johnson <- Quandl("WIKI/JNJ")
Anthem <- Quandl("WIKI/ANTM")
Aetna <- Quandl("WIKI/AET")
con <- dbConnect(MySQL(),
user = 'root',
password = 'password',
dbname = 'mysql')
dbWriteTable(con, value = Aetna, name = "Aetna")
dbListTables()
不除非我們看到您的實際代碼。 – hrbrmstr
@hrbrmstr添加了我的代碼 –