在R语言中使用COM

发布于 2024-08-02 17:34:39 字数 801 浏览 6 评论 0原文

我正在尝试让 R 的 rcom 包正常工作。它似乎已经安装好:

> install.packages("rcom");
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://mira.sunsite.utk.edu/CRAN/bin/windows/contrib/2.9/rcom_2.2-1.zip'
Content type 'application/zip' length 204632 bytes (199 Kb)
opened URL
downloaded 199 Kb

package 'rcom' successfully unpacked and MD5 sums checked

The downloaded packages are in
        C:\Users\solomon\AppData\Local\Temp\Rtmpzb5oi4\downloaded_packages
updating HTML package descriptions

然后我尝试运行一些东西:

>comCreateObject("Excel.Application");
Error: could not find function "comCreateObject"

我缺少什么,manual 告诉我 comCreateObject 是合适的命令。不过,该手册的版本有些旧。还有其他人有任何见解吗?

I am trying to get the rcom package for R working. It seems to have installed ok:

> install.packages("rcom");
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://mira.sunsite.utk.edu/CRAN/bin/windows/contrib/2.9/rcom_2.2-1.zip'
Content type 'application/zip' length 204632 bytes (199 Kb)
opened URL
downloaded 199 Kb

package 'rcom' successfully unpacked and MD5 sums checked

The downloaded packages are in
        C:\Users\solomon\AppData\Local\Temp\Rtmpzb5oi4\downloaded_packages
updating HTML package descriptions

Then I try to run something:

>comCreateObject("Excel.Application");
Error: could not find function "comCreateObject"

What am I missing, the manual tells me that comCreateObject is the appropriate command. However, the manual's version is somewhat old. Anyone else have any insights?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小鸟爱天空丶 2024-08-09 17:34:40

我可以在这里看到一些潜在的问题 - rcom 有一个奇怪的安装。

  1. 您是否加载了该软件包 - 即安装后运行library(rcom)?我知道,我知道 - 但我总是忘记那一步,它肯定会给你“找不到函数”错误。

  2. 您是否运行了installstatconnDCOM()命令?我几乎没有注意到它告诉我要这样做。

I can see a couple of potential problems here - rcom has a weird installation.

  1. Did you load the package - that is, run library(rcom) after installing it? I know, I know - but I forget that step all the time, and it would definitely give you the "could not find function" error.

  2. Did you run the installstatconnDCOM() command? I almost didn't notice it telling me to do this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文