我正在使用R studio对数据进行分析。能够安装RMYSQL库并连接到DB但是当我尝试编写select查询时,我无法获取数据。我写过如下脚本
> mydb <- dbConnect(MySQL(), user='user', password='password',
dbname='dbname', host='host')
> rs <- dbSendQuery(mydb, "select * from tableName")
> data <- fetch(rs, n=-1)
> dbHasCompleted(rs)
获得以下错误
> rs <- dbSendQuery(mydb, "select * from tableName")
> data <- fetch(rs, n=-1)
Error in (function (env, objName) :
could not find function "object.size"
Error in (function (env, objName) :
could not find function "object.size"
任何人都可以帮助从DB获取数据