R 连接 MySQL
library(RMySQL)
library(psych)
conn <- dbConnect(MySQL(),dbname="douban",user="root",password="52332580",host='127.0.0.1')
dbWriteTable(conn, name = 'Test', value = as.data.frame(Thurstone))
dbGetQuery(conn,"select * from Test")
dbDisconnect(conn)
library(psych)
conn <- dbConnect(MySQL(),dbname="douban",user="root",password="52332580",host='127.0.0.1')
dbWriteTable(conn, name = 'Test', value = as.data.frame(Thurstone))
dbGetQuery(conn,"select * from Test")
dbDisconnect(conn)
评论
发表评论