On 7/23/2012 4:25 PM, Jean V Adams wrote:> I am having trouble using the R2wd package. The last time I used it
> successfully, I was running an earlier version of R and an earlier version
> of Word with an earlier Windows OS. I'm not sure which if any of these
> changes might be contributing to the problem. Right now I'm using
> R version 2.15.0 (2012-03-30) for Windows
> MS Word 2010 version 14.0.6112.5000 (32-bit)
> Windows 7 Enterprise 2009 (Service Pack 1)
>
> When I submit the following code
> library(R2wd)
> library(rcom)
> wdGet()
> I get this error message
> Error in if (wdapp[["Documents"]][["Count"]] ==
0)
> wdapp[["Documents"]]$Add() :
> argument is of length zero
I have a new R on a new Win7 OS since I last wdget() so i decided to try
to reproduce your error
I tried your code and got the same error (R2.15.1), but the library(rcom)
However, as you note below, that line also told me to install
RDCOMClient with the command;
installstatconnDCOM()
I did this and the install happened seamlessly with only a few user
interactions.
wdget() now works just fine. The only missing instruction here is that
it is necessary to stop and restart R after installing the RDCOMClient.
If you did not try that give it a try. It worked well for me.
Rob
> I saw in a previous posting to r-help (
> http://r.789695.n4.nabble.com/R2wd-error-in-wdGet-td4632737.html), someone
> asked if RDCOMClient was installed and working properly. So, I tried
> submitting this code
> install.packages("RDCOMClient", repos =
"http://www.omegahat.org/R")
> And I got this warning message:
> package ?RDCOMClient? is not available (for R version 2.15.0)
>
> I also ran
> installstatconnDCOM()
> And it seemed to install fine. But when I try to run statconn DCOM's
> Server 01 ? Basic Test, and then select Start R, I get this message
> Loading StatConnector Server... Done
> Initializing R...Function call failed
> Code: -2147221485
> Text: installation problem: unable to load connector
> Method '~' of object '~' failed
> Releasing StatConnector Server...Done
>
> Any suggestions for how I might get wdGet() to work?
>
> Thanks in advance.
>
> Jean
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.