Re: [Rcom-l] Read Excel data

2008-01-21 Thread Erich Neuwirth
Uma Sitaraman wrote: > Hi, > > > > I am new to both R and RDcom, and am stuck trying to read excel data > using R (through VBA code). I tried out the test code posted in the web > (given below) > > > > Sub ReadTest() > >> rinterface.StartRServer > >> rinterface.RRun "setwd(""c:

Re: [Rcom-l] Read Excel data

2008-01-21 Thread Felipe Carrillo
Hope this helps: Sub MyMACRO() Call rinterface.StartRServer 'Put the dataframe into R Call rinterface.PutDataframe("dataframeName", Range("Sheet1!A1:D" & Range("D1").End(xlDown).Row)) Call rinterface.RRun("attach(dataframeName)") Call rinterface.StopRServer > I am new to both R and RDcom, and am

[Rcom-l] Read Excel data

2008-01-21 Thread Uma Sitaraman
Hi, I am new to both R and RDcom, and am stuck trying to read excel data using R (through VBA code). I tried out the test code posted in the web (given below) Sub ReadTest() > rinterface.StartRServer > rinterface.RRun "setwd(""c:/work/rcomtest"")" > ChDir "c:\work\rcomtest" >