elisa
elisa

Reputation: 995

Sublime 3 not interfacing with R (tried R-box and REPL)

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.

Upvotes: 9

Views: 4299

Answers (2)

elisa
elisa

Reputation: 995

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

Upvotes: 2

scribbles
scribbles

Reputation: 4339

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.

Upvotes: 2

Related Questions