Cannot connect R to DB2

2019-09-08 03:39发布

问题:

I want to connect R 3.2.3 to DB2. I tried this code :

library(RJDBC)
jcc = JDBC("com.ibm.db2.jcc.DB2Driver","c:/installed/sqllib/java/db2jcc4.jar")

I get this error :

Error: could not find function "JDBC"

Any Ideas ?

回答1:

Tantaoui, I suggest you take a look at ibmdbR, which is a dedicated R data frame API to DB2 and dashDB data: https://cran.r-project.org/web/packages/ibmdbR/ibmdbR.pdf



标签: r jdbc db2