What are the ways to create an executable from R program - r

I want to know if there is anyway of creating an executable R program to be run in UNIX. I think RInside will do the job but just want to know if there is any other way of doing this.
Thanks in Advance

The exact answer depends on your requirements, but you can start by looking at Rscript (see http://stat.ethz.ch/R-manual/R-devel/library/utils/html/Rscript.html and http://blog.revolutionanalytics.com/2009/01/using-r-as-a-scripting-language-with-rscript.html), as well as littler (http://code.google.com/p/littler/).

Related

How to call shell command via VAPI-XP-TEST

I have .py script that run from the cmd.
I want to execute it in quality center automatically (I understood that is done using the test type VAPI-XP-TEST) and to get indication of '"Pass"/"Fail".
How exactly I can do it?
Thanks.
Check this link: http://alm-help.saas.hpe.com/en/12.50/online_help/Content/UG/t_create_vapixp_scripts.htm
Also, VAPI-XP allows Python script. I have not used Python for VAPI-XP yet, but HP documentation in the above link I believe can help you get up to speed.

Export output and command lines in R [duplicate]

Is there an easy way to have R record all input and output from your R session to disk while you are working with R interactively?
In R.app on Mac OS X I can do a File->Save..., but it isn't much help in recovering the commands I had entered when R crashes.
I have tried using sink(...,split=T), but it doesn't seem to do exactly what I am looking for.
Many of us use ESS / Emacs for this very reason. Saving old sessions with extension '.Rt' even gives you mode-specific commands for re-running parts of your session.
Greg Snow wrote recently on the R-help list (a very valuable resource, SO R people!):
"You may also want to look at ?TeachingDemos::txtStart as an alternative to sink, one advantage is that the commands as well as the output can be included. With a little more work you can also include graphical output into a transcript file."
r-help
Check out the savehistory() command
I'm not sure yet how to answer an answer, but there is an updated version of Ranke's vim r-plugin called r-plugin2 available here. It seems more user-friendly and robust than the original.
Emacs is good, but for those of us with a vi preference there's the vim-r plugin at:
http://www.uft.uni-bremen.de/chemie/ranke/index.php?page=vim_R_linux
It works brilliantly and has a tiny memory footprint.

R: send multiple commands to Windows' cmd

I think and hope this is super easy, but I am jsut too stupid/blind:
I want to use system and not only open the command-line of windows, but to perform a simple copy task within it:
system('cmd' , 'copy Frame_Ind* all.dat')
So I thought... I want to copy alle files which start with "Frame_Ind" together into one that is calles "all.dat".
Can you tell me how to prompt more than one command with system?
I know this is a weird workaround, but it would help me a lot! Thanks and Cheers,
Al
Try the following:
shell('copy Frame_Ind* all.dat')

ESS and RScript : Executing in style of `compile-dwim-run'

I just got ESS set up in EMACS (I'm a relative newbie in this area). I have figured out how to take an R script and fire up an interactive R shell and evaluate a whole buffer ("C-c C-b"). But I'd also like to have the ability to submit an R script via RScript in the way that you can with Perl or Python with `compile-dwim-run', which I have bound to "C-c r", and have the whole output returned to me in a separate buffer without keeping open an interactive R shell.
I can't seem to find a default way to do this, and I'd like to leverage whatever ESS has to work that (I assume there is) before I go off and attempt to roll my own.
Thank you,
Matt
C-c C-l is what you are looking for? Use C-c C-h to see all the keys that are bound on C-c map (an even better approach is to install helm-descrbind from emacs package manager - you will be pleasantly surprised :).
[edit:] Sorry, misread your post slightly. You want batch evaluation. That is not available for R. The reason, the analysis in R is usually a complex process which you don't want to execute again and again. So you keep your interactive session open and iteratively achieve what you want.
There have been talks inside ESS to add some batch functionality, but it seems like very few people really need that.

maintaining an input / output log in R

Is there an easy way to have R record all input and output from your R session to disk while you are working with R interactively?
In R.app on Mac OS X I can do a File->Save..., but it isn't much help in recovering the commands I had entered when R crashes.
I have tried using sink(...,split=T), but it doesn't seem to do exactly what I am looking for.
Many of us use ESS / Emacs for this very reason. Saving old sessions with extension '.Rt' even gives you mode-specific commands for re-running parts of your session.
Greg Snow wrote recently on the R-help list (a very valuable resource, SO R people!):
"You may also want to look at ?TeachingDemos::txtStart as an alternative to sink, one advantage is that the commands as well as the output can be included. With a little more work you can also include graphical output into a transcript file."
r-help
Check out the savehistory() command
I'm not sure yet how to answer an answer, but there is an updated version of Ranke's vim r-plugin called r-plugin2 available here. It seems more user-friendly and robust than the original.
Emacs is good, but for those of us with a vi preference there's the vim-r plugin at:
http://www.uft.uni-bremen.de/chemie/ranke/index.php?page=vim_R_linux
It works brilliantly and has a tiny memory footprint.

Resources