[R] Statconnector and Excel

nolwennlm@netcourrier.com nolwennlm at netcourrier.com
Thu Mar 7 09:36:26 CET 2002

I'm trying to combine a VBA macro and a R package. I've installed the R-(D)COM and the R-excel interface by Neuwirth. They seem to work both. However I would like to display the r-generated data in  an Excel sheet as an array but I don't manage.

Here is an example of my source:
Sub doR()
Call RInterface.StartRServer
Call RInterface.RRun("library(mdnn)")
Call RInterface.RRun("F11b1<-read.table(""c:/test/Testb1.txt"", header=TRUE)")
Call RInterface.RRun("passTestb1<-pass(Testb1, Threshold=5, ExtremeThreshold=5)")
Call RInterface.RRun("passTestb1")
Call RInterface.getArray("passTestb1", Range("D2"))
Call RInterface.StopRServer
end sub

but I get an error :
"unsupported data when trying to execute "passTestb1"

I also tried:

 Dim x As StatConnector
 Set x = New StatConnector

  MsgBox ("Initializing R...")
  x.Init ("R")
  x.EvaluateNoReturn ("F11b1<-read.table(""c:/test/Testb1.txt"", _ header=TRUE)")
but then I don't known how to end

Have you an idea to help me?


NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 E TTC/min - 2,21 F TTC/min)
Minitel: 3615 NETCOURRIER (0,15 E TTC/min - 1,00 F TTC/min)

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list