Using COM in R

I'm trying to get the rcom package to work R. It seems he 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 I am missing, the guide tells me that comCreateObject is the appropriate command. However, the version of the manual is somewhat outdated. Anyone else have any ideas?

+5
source share
1 answer

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

  • Did you download the package, i.e. launched library(rcom)after installing it? I know, I know, but I forget this step all the time, and it will definitely give you the error “could not find the function”.

  • Have you completed the command installstatconnDCOM()? I almost did not notice that this tells me about it.

+7
source

All Articles