Super basic question here:
I installed the R-box package in Sublime 3 with no problems. I changed the path to my R.app in the SublimeREPL.sublime-settings in Sublime, although this should not make a differece on Mac. I checked in Package Control -> R-Box:Select Program. It's set to R.
I'm simply unable to get Sublime to send code to R. Pressing Cmd+Enter does nothing (actually, it starts a new line on Sublime).
I'm running Sublime 3 on Maverics, and R version 3.2.1. But I had the same problems with Sublime 2 and a previous R version. I'm sure I'm missing something simple but I can't find any more information in the installation page.
You can also send your code to R within Sublime Text by using REPL. Cmd + Shift + P, then type “SublimeREPL: R” and that’s it. Please, comment your experience. You can be sure that trying this editor is worthwhile.
Cmd + Shift + P, then type “Install Package”, look for SublimeREPL and install it. Cmd + Shift + P, then type “Install Package”, look for R-Box and install it. Cmd + Shift + P, then type “Install Package”, look for SendTextPlus and install it. Cmd + Shift + P, then type “Install Package” look for R-Snippets and install it.
Here at STATWORX, most of us are using Sublime Text on a daily basis. The editor – like many others of course – supports syntax highlighting for a variety of programming languages. Among others, our main tools like Python, R, and its extensions.
I use Sublime Text as my IDE of choice for all things not Python. It has a clean interface, it is easy to configure and is reasonably ligthweight. So when I had to develop some code in R for my work, I wanted to use this IDE to run blocks of code, build entire scripts and easily commit them to a shared repo with Git.
Open up an R console by pressing Ctrl+Shift+P and typing REPL R (after a few times you’ll be able to just type R and it will come up). You can open up two windows using (Alt+Shift+2) so you can have your R code on the left and your R console on the right.
As for running the code, once you have called the R console, you have three options: To run the current line or your selected lines, press Ctrl+Shift (release) then l. To run just the selected text, press Ctrl+Shift (release) then s. To run the entire file, press Ctrl+Shift (release) then f.
Actually, I got an answer from the R-box developers, that worked perfectly: Close Sublime Text 3, then reopen it. Then check that at the bottom right of the window it says R Extended.
If not, you need to set the Syntax on the file:
cmd+shift+P Set Syntax: R Extended
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With