问题
Does anyone know of any way to connect to an OLEDB data source directly in R?
I've tried google, CRAN and rseek with no luck whatsoever.
回答1:
A good alternative to both ODBC and OLEDB for saving data to SQL Server is to BCP using the rsqlserver package that is on GitHub here: https://github.com/agstudy/rsqlserver
You can pull down data via ODBC if you'd like which would be pretty fast, but sending data to SQL Server via ODBC will take a long time (in my tests), so BCP is a great option.
It's a little difficult to install (requires .NET and rtools), but once you get it going it's blazing fast.
回答2:
Depending on versions and drivers, this may work: http://cran.r-project.org/web/packages/RODBC/index.html
来源:https://stackoverflow.com/questions/7781478/oledb-connection-in-r