Create BATCH file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Create BATCH file

R_Antony
Hi,

I have a ".R" file written many functions into that. My requirement what is,
i need  to create a batch file for this.
No idea, how to create it. Tried it many other ways, but no result !.
Could anyone please help me out ?

Thanks.
Antony.




--
View this message in context: http://r.789695.n4.nabble.com/Create-BATCH-file-tp4650277.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Create BATCH file

Suzen, Mehmet
Try this:
http://stat.ethz.ch/R-manual/R-patched/library/utils/html/BATCH.html

On Wed, Nov 21, 2012 at 11:58 AM, R_Antony <[hidden email]> wrote:

> Hi,
>
> I have a ".R" file written many functions into that. My requirement what is,
> i need  to create a batch file for this.
> No idea, how to create it. Tried it many other ways, but no result !.
> Could anyone please help me out ?
>
> Thanks.
> Antony.
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Create-BATCH-file-tp4650277.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Create BATCH file

FJ M
In reply to this post by R_Antony

"C:\Program Files\R\R-2.15.1\bin\x64\R.exe" CMD BATCH    "C:\Users\Frank\Documents\R\Projects\Current_Yield\Divs.txt" "C:\Users\Frank\Documents\R\Projects\Current_Yield\Divs.out"
Divs.txt contains my R code and the output goes to Divs.out. I always check Divs.out first.
If you want to write objects to divs.out, I seem to need to use the print command, not just have the object name:
ndivs<-nrow(Divs)
print(ndivs)
Divs_Per_Year<-4
print(Divs_Per_Year)
Let me know if you have any questions.
Thanks,
Frank

----------------------------------------

> Date: Wed, 21 Nov 2012 02:58:53 -0800
> From: [hidden email]
> To: [hidden email]
> Subject: [R] Create BATCH file
>
> Hi,
>
> I have a ".R" file written many functions into that. My requirement what is,
> i need to create a batch file for this.
> No idea, how to create it. Tried it many other ways, but no result !.
> Could anyone please help me out ?
>
> Thanks.
> Antony.
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Create-BATCH-file-tp4650277.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] 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.    
______________________________________________
[hidden email] 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.