lways worked as long
> as I
> > am running my script through Tinn-R or directly in
> the
> > R Console. If read.table doesn't work with a macro
> > then I will probably stick with Tinn-R directly.
> >
> > --- "Lindsay, Dwayne" <[EMAIL PROTECTED
ssage-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On
>> Behalf Of Erich
>> Neuwirth
>> Sent: Tuesday, August 14, 2007 1:02 PM
>> To: R (D)COM and RExcel server related issues
>> Subject: Re: [Rcom-l] Excel Macro
>>
>> sh
: Tuesday, August 14, 2007 1:02 PM
> To: R (D)COM and RExcel server related issues
> Subject: Re: [Rcom-l] Excel Macro
>
> show us your read.table command.
> does it have the fiull path with the right kind of
> backlslahes
> or slashes?
>
> Felipe Carrillo wrote:
Not sure what am I doing wrong...I copied my Test.r
file into the spreadsheet on cells A1:A3 then I
selected A1 and clicked on RExcel|Run Code,then
selected A2 then A3 and did the same thing.By doing it
this way it works fine but I can't get it to work
through the macro. I also tried Dwayne's tip b
Read.table does not work when reading from Excel.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Erich
Neuwirth
Sent: Tuesday, August 14, 2007 1:02 PM
To: R (D)COM and RExcel server related issues
Subject: Re: [Rcom-l] Excel Macro
show us your
Subject: Re: [Rcom-l] Excel Macro
Erich:
The code below has a read.table(.)statement and is
ignored by R. Can you point out what am I doing wrong
or if I need additional code? Thanks
Sub Testing()
Call RInterface.StartRServer
Call RInterface.RunRFile("C:\Documents and
Settings\Owner\Desk
ECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Felipe
Carrillo
Sent: Tuesday, August 14, 2007 10:55 AM
To: R (D)COM and RExcel server related issues
Subject: RE: [Rcom-l] Excel Macro
Dwayne:
Thanks a lot for your help,it works fine but for some
reason when I try to import a dataset within my script
R do
are you using th R(D)COM server or rcom.
I suggest you ise rcom,
then you see what is happening.
you also can switch on debugging in RExcel to see what goes wrong.
Felipe Carrillo wrote:
> # The filename is Test.r
> chinook <- read.table("C:/Documents and
> Settings/Owner/Desktop/R-Software/chi
# The filename is Test.r
chinook <- read.table("C:/Documents and
Settings/Owner/Desktop/R-Software/chinook.txt",header=T,sep="\t")
chinook$IDDate <- as.Date(chinook$IDDate, "%m/%d/%Y")
qplot(IDDate,Fry, data=chinook, geom="line")
I try to call it like this:
Sub Testing()
Call RInterface.StartRSe
show us your read.table command.
does it have the fiull path with the right kind of backlslahes
or slashes?
Felipe Carrillo wrote:
> Erich:
> The code below has a read.table(.)statement and is
> ignored by R. Can you point out what am I doing wrong
> or if I need additional code? Thanks
>
> S
Erich:
The code below has a read.table(.)statement and is
ignored by R. Can you point out what am I doing wrong
or if I need additional code? Thanks
Sub Testing()
Call RInterface.StartRServer
Call RInterface.RunRFile("C:\Documents and
Settings\Owner\Desktop\R-Software\ATest.r")
End Sub
---
Felipe-
Did you get my previous reply on importing data?
D-
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Felipe
Carrillo
Sent: Tuesday, August 14, 2007 10:55 AM
To: R (D)COM and RExcel server related issues
Subject: RE: [Rcom-l] Excel Macro
Dwayne
The script can use all R functions
for reading data,
load (for workspaces)
or read.table or
read.spss (from package foreign)
Felipe Carrillo wrote:
> Dwayne:
> Thanks a lot for your help,it works fine but for some
> reason when I try to import a dataset within my script
> R doesn't execute. It wo
Dwayne:
Thanks a lot for your help,it works fine but for some
reason when I try to import a dataset within my script
R doesn't execute. It works if I include something
like this in my script:
set.seed(101)
gender <-
factor(x=c(rep("Male",30),rep("Female",70)))
age.class <-
factor(x=rep(c("Y","
Felipe-
This is a sample of code that I often use:
Call RInterface.RRun(" source(""C://temp//Capital Tracking Script.txt"",
local = F, chdir = T) ")
Where the .txt file is my R-script saved as a .txt file. I find it a
lot easier to do most of my programming in R, and use VBA only as an
interface
15 matches
Mail list logo