5

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?

1 Answer 1

7

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.

Sign up to request clarification or add additional context in comments.

2 Comments

That helped me get started. However, it got more complex. I had an old version of R and some DCOM for R installer that prevented statconnDCOM from installing. Also, for some reason, the version of rcom was old from the mirror I was using. Note: sysinternals DebugViewer is your friend for RCOM.
For clarification, comCreateObject works even when installstatconnDCOM() failed. So, it appeared that statconnDCOM actually installed okay.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.