RODBC 和 Access - 加载数据
我正在尝试将一些数据从 Access 数据库加载到 R 中。我能找到的所有说明都说使用 odbcConnectAccess("file.mdb") 但我似乎无法加载此函数。是否已被替换或重命名?还有其他方法可以做到这一点吗?我已经用库(“RODBC”)加载了 RODBC,但仍然没有运气。
谢谢你!
I am trying to load some data into R from an Access database. All of the instructions I can find say to use odbcConnectAccess("file.mdb") but I cannot seem to load this function. Has it been replaced or renamed? Is there another way to do this? I've loaded RODBC with library("RODBC") but still have no luck.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我的会话的样子。你的看起来相似吗?
它在我的系统上完美运行。 Window 7、Microsoft Access 2007年左右。不知道你对Access数据库的熟练程度如何。我使用它几年了,发现只要我是唯一的用户,它就可以正常工作。当我尝试复制数据库或共享数据库或让同事向其中添加数据时,它就变得无法使用。我已尽我所能,不再与它打交道。如果您有一个持续的使用场景,那么我想您必须让 odbcConnectAccess 才能工作。但是,如果是一次性的,则只需从 Access 导出为更常规的数据格式,例如 csv 表。
Here is what my session looks like. Does yours look similar?
It works perfectly on my system. Window 7, Microsoft Access around 2007. I do not know how proficient you are in Access databases. I used it for a few years and discovered that as long as I was the sole user it worked alright. The minute I tried to copy the database or share it or have a collegue add data to it it became unworkable. I have done all I can to work with it no more. If you have an ongoing use scenario then I guess you have to get odbcConnectAccess to work. However, if it is a one off then just export from Access to a more conventional data format, such as a csv table.
如果您在 Mac 上使用,我发现使用 Actual Technologies 驱动程序可以成功连接到 Access 数据库。如果您已经使用 Windows 上的 ODBC 源管理器或 Mac 上的 ODBC 管理器设置了 ODBC 连接,则其余部分相当简单。
odbcConnect 中还有一个提供密码的选项,但我已经使用包含的密码设置了连接。
If you're using on a Mac, I've found success using Actual Technologies drivers to connect to Access databases. If you've already set up the ODBC connection, using ODBC Source Administrator on Windows or ODBC Administrator on a Mac, the rest is fairly straightforward.
There is also an option to supply a password in odbcConnect, but I've set up the connection with the password included.