Re: [R] how to call R in delphi?

2005-01-20 Thread Earl F. Glynn
"Dieter Menne" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> To call R from Delphi, you may try
> http://www.menne-biomed.de/download/RDComDelphi.zip.

I downloaded this file and tried to compile the RDCom project using Delphi 5
and Delphi 7 but I get this message from both  compilers:

[Fatal Error] STATCONNECTORCLNTLib_TLB.pas(406): Could not create output
file 'c:\program
files\borland\delphi7\Twain\d5\dcu\STATCONNECTORCLNTLib_TLB.dcu'



The "\db\dcu" in the path in this error message was a bit curious so I
looked at

Project | Options | Directories/Conditionals



Unit output directory:

$(DELPHI)\Twain\d5\dcu



Search path:

$(DELPHI)\Compon;C:\D2Pr\CascCont\COMPON;$(DELPHI)\Source\Toolsapi



On my "vanilla" Delphi 5 and Delphi 7 installations all of the directories
for the Unit output directory and Search path are invalid for the RDCom.dpr
project.

If I delete the Unit output directory, I then get 17 compilation errors, all
like this:
[Error] RCom.pas(115): Undeclared identifier: 'VarType'
[Error] RCom.pas(141): Undeclared identifier: 'VarArrayDimCount'
[Error] RCom.pas(123): Undeclared identifier: 'VarArrayHighBound'
. . .

All of the above seems to happen whether or not I install
STATCONNECTORCLNTLib_TLB.pas and STATCONNECTORSRVLib_TLP.pas as components
(i.e., Component | Install Component |  | Open | OK |
Compile).  Am I supposed to do this at some point?

Can you give me any clues how to make this work?  Something seems to be
missing.

>   Example program showing use of R from Delphi.
>   Connecting to R via COM using Neuwirth's StatConnectorSrvLib
>   Uses RCom.pas, which is a simple Delphi wrapper for passing
>   commands, integer and double arrays.
>   See http://cran.r-project.org/contrib/extra/dcom
>   By:  [EMAIL PROTECTED]

I'm not sure I understand this either.  I went to
http://cran.r-project.org/contrib/extra/dcom

I read this documentation:
http://cran.r-project.org/contrib/extra/dcom/RSrv135.html

I downloaded and installed the R(COM) server (and rebooted)
http://cran.r-project.org/contrib/extra/dcom/RSrv135.exe

So, how I can I call "R" from Delphi using R(COM)?  Something seems to be
missing.

Duncan Murdoch's suggestion about direct calls to R.dll looks interesting,
but a complete working example would be nice.

Thanks for any help with this.

efg
Earl F. Glynn
Scientific Programmer
Stowers Institute for Medical Research

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] how to call R in delphi?

2005-01-19 Thread Warnes, Gregory R
You can also use SOAP to communicate with R via RSOAP (http://rsoap.sf.net).

-G

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Duncan Murdoch
> Sent: Wednesday, January 19, 2005 4:10 AM
> To: YiYao_Jiang
> Cc: r-help@stat.math.ethz.ch; Jack_Kang; Ivy_Li
> Subject: Re: [R] how to call R in delphi? 
> 
> 
> On Wed, 19 Jan 2005 10:12:07 +0800, "YiYao_Jiang"
> <[EMAIL PROTECTED]> wrote :
> 
> >Dear All:
> >
> >Now I am writing  program in delphi , found it is very 
> convenience to do anova, T-test, F-Test, etc in R , how to 
> call R in delphi? Thsnks.
> 
> Tom referred you to a post about the COM interface.  
> 
> You can also do some of what you want with direct calls to R.dll.  See
> the "R API: entry points for C code" section of the Writing R
> Extensions manual.  If you're unfamiliar with calling C entries from
> Delphi, my web page
> <http://www.stats.uwo.ca/faculty/murdoch/software/compilingDLLs/>
> might help, though it is aimed at writing DLLs, rather than using
> R.dll.  
> 
> But that's another option:  let R be in charge, and just add some
> functions in a DLL written in Delphi.
> 
> Duncan Murdoch
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] how to call R in delphi?

2005-01-19 Thread Dieter Menne
To call R from Delphi, you may try 
http://www.menne-biomed.de/download/RDComDelphi.zip.

  Example program showing use of R from Delphi.
  Connecting to R via COM using Neuwirth's StatConnectorSrvLib 
  Uses RCom.pas, which is a simple Delphi wrapper for passing
  commands, integer and double arrays.
  See http://cran.r-project.org/contrib/extra/dcom
  By:  [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] how to call R in delphi?

2005-01-19 Thread Duncan Murdoch
On Wed, 19 Jan 2005 10:12:07 +0800, "YiYao_Jiang"
<[EMAIL PROTECTED]> wrote :

>Dear All:
>
>Now I am writing  program in delphi , found it is very convenience to do 
>anova, T-test, F-Test, etc in R , how to call R in delphi? Thsnks.

Tom referred you to a post about the COM interface.  

You can also do some of what you want with direct calls to R.dll.  See
the "R API: entry points for C code" section of the Writing R
Extensions manual.  If you're unfamiliar with calling C entries from
Delphi, my web page
<http://www.stats.uwo.ca/faculty/murdoch/software/compilingDLLs/>
might help, though it is aimed at writing DLLs, rather than using
R.dll.  

But that's another option:  let R be in charge, and just add some
functions in a DLL written in Delphi.

Duncan Murdoch

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] how to call R in delphi?

2005-01-18 Thread Mulholland, Tom
Try searching this list for delphi. This was the first post I found. You may 
find it helpful.

http://finzi.psych.upenn.edu/R/Rhelp02a/archive/19154.html

Tom

> -Original Message-
> From: YiYao_Jiang [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 19 January 2005 10:12 AM
> To: r-help@stat.math.ethz.ch
> Cc: Jack_Kang; Ivy_Li
> Subject: [R] how to call R in delphi? 
> 
> 
> Dear All:
> 
> Now I am writing  program in delphi , found it is very 
> convenience to do anova, T-test, F-Test, etc in R , how to 
> call R in delphi? Thsnks.
> 
> 
> 
> 
> Best Regards
> 
> YiYao Jiang 
> 
> Product Division/ product Testing Department
> Semiconductor Manufacturing International Corporation
> ZhangJiang Road, PuDong New Area, Shanghai  ZIP: 201203
> Tel:86-21-5080-2000 Ext. 15173
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] how to call R in delphi?

2005-01-18 Thread YiYao_Jiang
Dear All:

Now I am writing  program in delphi , found it is very convenience to do anova, 
T-test, F-Test, etc in R , how to call R in delphi? Thsnks.




Best Regards

YiYao Jiang 

Product Division/ product Testing Department
Semiconductor Manufacturing International Corporation
ZhangJiang Road, PuDong New Area, Shanghai  ZIP: 201203
Tel:86-21-5080-2000 Ext. 15173

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html