I am trying to connect to an Oracle Database in R. In Python, I simply use the cx_Oracle package, and can easily connect and run a query using the following code:
my_dsn = cx_Oracle.makedsn("host",port,sid="sid")
connection = cx_Oracle.connect(user="user", password="password", dsn=my_dsn)
cursor = connection.cursor()
querystring = "SQL query"
cursor.execute(querystring)
Is there an equivalent package in R to use? If so, what is it, and how do I set up my bearings to connect to the Oracle database and run a query--saving the result into a data.frame? I need to be able to construct a DSN, as I have done in the code above, too. Thank you!
ROracleon both CRAN and Oracle's website. You might also consider one of the ODBC variants,RODBCorodbc.