6

I want to make an executable R-file (for automation purposes). Therefore I concluded the following tutorial.

After completion however nothing happens... Only the .Rexec file opening in RStudio (in stead of running it and showing me the pop up...

Any more people experienced this? Any clues to where to look to fix this?

3
  • 2
    I have no experience with a .Rexec file but what I do is the following : create a batch file which will launch your .R script. It works fine. Commented Nov 17, 2015 at 10:55
  • I agree with @etienne that running a batch file is probably more conventional. Commented Nov 17, 2015 at 15:11
  • You might find this useful: stackoverflow.com/a/32906727/1573580 Commented Nov 18, 2015 at 12:11

2 Answers 2

7

The tutorial you gave is useful. However, it missed something. After done all the things in that blog, you still need to do one more thing. Right click on the "test.Rexec" file and choose "open with" and then select "RScript". Maybe you need to find RScript in your system which is usually here:

C:\Program Files\R\R-3.2.1\bin\Rscript.exe

Remeber to check the "Always use the selected program to open this kind of file". Next time, when you double click the "test.Rexec" file, evethying would be okay.

Sign up to request clarification or add additional context in comments.

1 Comment

It don't stop after running rexec file. so, where can I see the output?
2

I found no need to create Rexec file. I created .bat file and then set it up in Task Scheduler.

The .bat file opens up the Rscript.exe, as shown in prev answer above. The .bat file then points to the .R file, that I want to be executed.

For some time, I could not get it to work, but solution was to point to Rscript.exe as mentioned above. Then it will not open up in compiler.

Works fine for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.