An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110524/293f1a2a/attachment.pl>
R in batch mode
4 messages · Jonathan Daily, Muhuri, Pradip (SAMHSA/CBHSQ)
Save it anywhere that is on your search path, which can be seen by typing path into the command line. On Tue, May 24, 2011 at 12:40 PM, Muhuri, Pradip (SAMHSA/CBHSQ)
<Pradip.Muhuri at samhsa.hhs.gov> wrote:
Hi Everyone, I am a new R user and trying to run R jobs in batch mode. Robert Muenchen (2009), in his book "R for SAS and SPSS Users", has suggested writing a small batch file like mR.bat as shown below: "C:\Program File\R\R-2.10.0\bin\Rterm.exe" --no-restore --no-save < %1 > %1.Rout 2>& 1 Could anyone tell me in which directory or subdirectory I should save the mR.bat file? I would appreciate receiving any support you could extend on this subject. Thank you in advance, Pradip Pradip K. Muhuri, PhD Statistician Substance Abuse & Mental Health Services Administration The Center for Behavioral Health Statistics and Quality Division of Population Surveys 1 Choke Cherry Road, Room 7-1023 Rockville, MD 20857 Tel: 240-276-1070 Fax: 240-276-1260 e-mail: Pradip.Muhuri at samhsa.hhs.gov<mailto:Pradip.Muhuri at samhsa.hhs.gov> The Center for Behavioral Health Statistics and Quality your feedback. ?Please click on the following link to complete a brief customer survey: ? http://cbhsqsurvey.samhsa.gov ? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
=============================================== Jon Daily Technician =============================================== #!/usr/bin/env outside # It's great, trust me.
Dear Jonathan (and List),
Sorry for bothering you again, and I am requesting your further guidance on this subject. Below are the steps, which I have followed. But I got an error message.
1. The content of myR.bat is as follows:
"C:\R\bin\i386\R\R-2.10.0\bin\Rterm.exe" --no-restore --no-save < %1 > %1.Rout 2>& 1
2. I have saved that .bat file in the subdirectory C:\R\bin\i386\R\R-2.10.0\bin.
3. on the R prompt, I have issued the following: setwd("E:/R")
4. Then I have issued the following: myR dateR.R.
Error: unexpected symbol in "myR dateR.R"
What am I doing wrong?
Please help resolve the issue.
Thanks,
Pradip
Pradip K. Muhuri
Statistician
Substance Abuse & Mental Health Services Administration
The Center for Behavioral Health Statistics and Quality
Division of Population Surveys
1 Choke Cherry Road, Room 7-1023
Rockville, MD 20857
Tel: 240-276-1070
Fax: 240-276-1260
e-mail: Pradip.Muhuri at samhsa.hhs.gov
The Center for Behavioral Health Statistics and Quality your feedback. Please click on the following link to complete a brief customer survey: http://cbhsqsurvey.samhsa.gov
-----Original Message-----
From: Jonathan Daily [mailto:biomathjdaily at gmail.com]
Sent: Tuesday, May 24, 2011 1:18 PM
To: Muhuri, Pradip (SAMHSA/CBHSQ)
Cc: R-help at r-project.org
Subject: Re: [R] R in batch mode
Save it anywhere that is on your search path, which can be seen by
typing path into the command line.
On Tue, May 24, 2011 at 12:40 PM, Muhuri, Pradip (SAMHSA/CBHSQ)
<Pradip.Muhuri at samhsa.hhs.gov> wrote:
Hi Everyone, I am a new R user and trying to run R jobs in batch mode. Robert Muenchen (2009), in his book "R for SAS and SPSS Users", has suggested writing a small batch file like mR.bat as shown below: "C:\Program File\R\R-2.10.0\bin\Rterm.exe" --no-restore --no-save < %1 > %1.Rout 2>& 1 Could anyone tell me in which directory or subdirectory I should save the mR.bat file? I would appreciate receiving any support you could extend on this subject. Thank you in advance, Pradip Pradip K. Muhuri, PhD Statistician Substance Abuse & Mental Health Services Administration The Center for Behavioral Health Statistics and Quality Division of Population Surveys 1 Choke Cherry Road, Room 7-1023 Rockville, MD 20857 Tel: 240-276-1070 Fax: 240-276-1260 e-mail: Pradip.Muhuri at samhsa.hhs.gov<mailto:Pradip.Muhuri at samhsa.hhs.gov> The Center for Behavioral Health Statistics and Quality your feedback. ?Please click on the following link to complete a brief customer survey: ? http://cbhsqsurvey.samhsa.gov ? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
=============================================== Jon Daily Technician =============================================== #!/usr/bin/env outside # It's great, trust me.
myR.bat is a microsoft batch file, meant to be run from the windows command line. If you are in R, you can run R files using a single command. Please try reading the Introduction to R that ships with R. This is a question that anyone who has made an effort at learning R would know. On Tue, May 24, 2011 at 2:05 PM, Muhuri, Pradip (SAMHSA/CBHSQ)
<Pradip.Muhuri at samhsa.hhs.gov> wrote:
Dear Jonathan (and List),
Sorry for bothering you again, and I am requesting your further guidance on this subject. Below are the steps, which I have followed. But I got an error message.
1. The content of myR.bat is as follows:
"C:\R\bin\i386\R\R-2.10.0\bin\Rterm.exe" --no-restore --no-save < %1 > %1.Rout 2>& 1
2. I have saved that .bat file in the subdirectory C:\R\bin\i386\R\R-2.10.0\bin.
3. on the R prompt, I have issued the following: setwd("E:/R")
4. Then I have issued the following: myR dateR.R.
Error: unexpected symbol in "myR dateR.R"
What am I doing wrong?
Please help resolve the issue.
Thanks,
Pradip
Pradip K. Muhuri
Statistician
Substance Abuse & Mental Health Services Administration
The Center for Behavioral Health Statistics and Quality
Division of Population Surveys
1 Choke Cherry Road, Room 7-1023
Rockville, MD 20857
Tel: 240-276-1070
Fax: 240-276-1260
e-mail: Pradip.Muhuri at samhsa.hhs.gov
The Center for Behavioral Health Statistics and Quality your feedback. ?Please click on the following link to complete a brief customer survey: ? http://cbhsqsurvey.samhsa.gov
-----Original Message-----
From: Jonathan Daily [mailto:biomathjdaily at gmail.com]
Sent: Tuesday, May 24, 2011 1:18 PM
To: Muhuri, Pradip (SAMHSA/CBHSQ)
Cc: R-help at r-project.org
Subject: Re: [R] R in batch mode
Save it anywhere that is on your search path, which can be seen by
typing path into the command line.
On Tue, May 24, 2011 at 12:40 PM, Muhuri, Pradip (SAMHSA/CBHSQ)
<Pradip.Muhuri at samhsa.hhs.gov> wrote:
Hi Everyone, I am a new R user and trying to run R jobs in batch mode. Robert Muenchen (2009), in his book "R for SAS and SPSS Users", has suggested writing a small batch file like mR.bat as shown below: "C:\Program File\R\R-2.10.0\bin\Rterm.exe" --no-restore --no-save < %1 > %1.Rout 2>& 1 Could anyone tell me in which directory or subdirectory I should save the mR.bat file? I would appreciate receiving any support you could extend on this subject. Thank you in advance, Pradip Pradip K. Muhuri, PhD Statistician Substance Abuse & Mental Health Services Administration The Center for Behavioral Health Statistics and Quality Division of Population Surveys 1 Choke Cherry Road, Room 7-1023 Rockville, MD 20857 Tel: 240-276-1070 Fax: 240-276-1260 e-mail: Pradip.Muhuri at samhsa.hhs.gov<mailto:Pradip.Muhuri at samhsa.hhs.gov> The Center for Behavioral Health Statistics and Quality your feedback. ?Please click on the following link to complete a brief customer survey: ? http://cbhsqsurvey.samhsa.gov ? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
-- =============================================== Jon Daily Technician =============================================== #!/usr/bin/env outside # It's great, trust me.
=============================================== Jon Daily Technician =============================================== #!/usr/bin/env outside # It's great, trust me.