New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Rtools in Windows #17
Comments
Sorry I don't have access to a windows machine so I can't test this myself. One possible solution is that R might not be in your |
Thanks for responding. R wasn't in my path, but it is now. Unfortunately that doesn't fix the problem. This is what I have tried so far.
Still nothing has worked and I'm out of ideas. Has anyone been able to get this to work on Windows? |
Yes, please try changing R.exe to Rgui.exe in Rtools.py. Leave the sublime-build as it is. The key bindings should map to Windows as well. The |
I was able to Rtools to work in windows. To do so I edited my R.sublime-build file, I replaced the line Since osascript is a Mac only tool I had to use the application provided with R called Rscript. This is designed to be passed an R file run it and return the results. I am running windows 7, R 2.15.2, and ST2 version 2.0.1 build 2217 I since I do not have access to a Mac I do not know how Rtools behaves when being ran by osascript. However I would imagine that if you are able to get the same behavior with Rscript (assuming that it is available for Mac) you would then be able to make your package platform independent. Assuming you could have the R path set by a variable that is defined by the user that it ;) Hope that helps! |
Thanks GildedRabbit for the suggested. I did what you said, and I now I see the Rscript briefly flash when I pass commands to R. I still can't seem to get them to pass to the Rgui. In addition to what you suggested I had to update the Rtools.py file with the following, changing the args to Rscript and R64 to Rgui.exe. split selection into lines
I also copied the keybindings from the R into the Key Bindings - User file and edited it to my needs: Were you able to get Rtools to pass the commands to Rgui? If not, is there a way to make the Rscript window stay open rather than closing immediately after running your commands? Thanks for the help so far. |
G-Force glad that kinda worked for you, and thanks for the key bindings. I have not been able to get Rtools to pass to the Rgui. I think this is because Rgui does not accept the '-file' option like the commend line R does. I am new to Sublime Text and Java is not my strong point, however I did grab the source for NppToR and go over it. It looks like in order to pass to the Rgui and have it remain open the text desired to be passed needs to be stored either in a variable or the clipboard, then pasted into an existing Rgui session. I have not yet gone over the code but I imagine that looking at SublimeREPL may offer some clues. As it can offer the functionality you are referring to, granted with some bugs..... Don't know if you saw this yet but here is the article I came across (you are actually mentioned in it). hope that helps, If I figure out anything more I will post it here. |
Are there step by step instructions for how to get this to work on windows? I tried changing the R64 to R.exe in the Rtools.py file but it still didn't work. I also changed the key bindings to something more windows friendly, but it still didn't work. Any suggestions?
The text was updated successfully, but these errors were encountered: