Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: Calling SAS and R code from Stata

From   n p <>
Subject   Re: st: Re: Calling SAS and R code from Stata
Date   Tue, 2 May 2006 08:05:09 -0700 (PDT)

I dont know if that's the best way but here's what I
...Stata code...
save myStataFile,replace

winexec "C:\Program Files\R\rw2010\bin\R.exe" CMD
BATCH "c:\\...\\program_in_R.r" 

... Stata code continues possibly reading results from
R_results.dta (see below)

R can read and write Stata files so your R code could
look like this :

... R code ...

 I hope this helps

Nikos Pantazis
Biostatistician, MSc

--- Babak Oskooei <> wrote:

> Dear Statalist,
> I have a question regarding STATA software.
> I would appreciate any comments on the following
> problem:
> I perform research on several measures of explained
> variation in survival analysis which were programmed
> in different software such as SAS, R and C. I am
> planning to conduct simulation studies on all these
> measures in STATA software. Considering the deadline
> I
> have, it is practically impossible for me to program
> all measures again in STATA. I was wondering whether
> these programs could be run from within STATA. I
> know
> that STATA allows you to call in C codes using
> Plugin
> facility that exist in STATA, but I do not know
> whether this is possible with SAS or R code. Is it
> possible to use SAS or R as slave programs? 
> I would be grateful for any comments on this or any
> references that I can refer to.
> Best regards
> Babak Oskooei
> PhD Student
> UCL Statistical Sciences Dep.

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index