if we have set the path of R to the Environment Variables,things will be much
convenient.
from Start -> Settings -> Control Panel -> System -> Advanced -> Environment
Variables
Now we are the Environment Variables window, we will only need to pay attention
to the lower window for System variables. Click on the Path Variable and then
click on Edit... Add ;"path\of\R" to the path.(for me,the path of R is
E:\Program Files\R\R-2.2.0\bin),note that each path is seperate by ";" and the
path itself is not quoted by "".
then
1,run cmd (start--run and type cmd then hit enter);
2,in the Windows shell,type R CMD BATCH infile [outfile]
======= 2005-10-15 16:58:33 您在来信中写道:=======
>sosman wrote:
>> jun xu wrote:
>>
>>>I am new to R and really like to get a handle of basics in short period of
>>>time. What I am trying to do is get myself a list of must-do's (read in
>>>data, batch execution, delimiters, basic modeling commands) in R as in Stata
>>>or SAS. I am just wondering how to execute a R batch file in RGui. Suppose I
>>>have a script file (like do file in stata, or sas file in SAS) under
>>>c:\whatever.R, how can I execute it using commands (not drop down menu) in
>>>RGui? In stata, would be something like
>>
>>
>> If I am not mistaken the command is:
>> > source("whatever.R")
>
>... or source("c:/whatever.R") if "c:\" is not your current working
>directory.
>
>>
>>> do c:\whatever.do
>>> How about in R. I tried the "R CMD BATCH('h:/whatever.R'), but it didn't
>>>work. Any help would be greatly appreciated.
>
>
>R CMD BATCH has to be executed from the Windows shell (looks like you
>are running this OS) rather than from within R with the Syntax (if
>called from c:\ and R is in your PATH):
>R CMD BATCH whatever.R
>
>Uwe Ligges
>
>
>
>>
>> paul sorenson
>>
>> ______________________________________________
>> [email protected] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>______________________________________________
>[email protected] mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
= = = = = = = = = = = = = = = = = = = =
2005-10-15
------
Deparment of Sociology
Fudan University
My new mail addres is [EMAIL PROTECTED]
Blog:http://sociology.yculblog.com
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html