Autocomplete R in Sublime Text 2 - r

I am trying to find a package that would support Autocomplete of the R Syntax in Sublime Text 2 similar to the way Sublime supports for Python or Ruby. That is when start typing 'vec..." it prompts with "vector" in the pop up.

Yep, it exists.
Drag R.sublime-completions into your ~/Library/Application Support/Sublime Text 2/Packages/R (or the equivalent folder in Windows). Another way to get to the folder is click Sublime Text > Preferences > Browse Packages...
Also, if you are going to use Sublime Text 2 for R, here is a (shameless) plug for rtools, which allows you to send selections from ST2 to R. You can install via Package Control.

Related

SublimeREPL : shortcut to pass R code with Sublime Text

I'm looking for a shortcut in Sublime Text 3 for R syntax that have the same "behaviour" as ctrl + r in the R app:
Pass line if nothing is selected
Pass only selection when something is selected
Go to next line / end of selection juste after passing a line / selection
Any idea ? Is there something similar to NppToR for Notepad++ ?
This can be done using 'SendCode' package of Sublime Text. You can install it through Package Control. Just make sure that the R console is open before you use the shortcut (for me it's ctrl + r)!.

Sending code from Sublime Text 3 to R Terminal or SublimeREPL

I realise there are a few threads that already exist with regards to the second half of my question, but they don't seem to address the problem.
I am using R-Box, SendText, and SendCode to send lines of code from Sublime Text 3 to the R-GUI. However, I prefer working in Rterm rather than the GUI. Is there a way to modify settings in any of the three sublime text packages to send code to Rterm.exe instead?
In the mean time, I recently got a new laptop and can't seem to get Sublime Text 3 to send code to SublimeREPL properly. It decides to send the occasional line, but will not send some for no reason. Any ideas how to fix it?
Thanks in advance for your help.
I made Sublime/R-Box/SendCode work with Rterm by changing the settings in the RGui to SDI.
In RGui > Gui Settings > Select "SDI" > Click on "Save" > Close R Gui (this will show a warning)
Reopen R Gui to check that it opens Rterm.
In Sublime, working with SendCode/R-Box then will open the Rterm.
Use the standard settings in SendCode (In Sublime: Crtl+Alt+P > SendCode: Choose Program > Select "R Gui"), it works with R Term.
Note: You must open Rterm manually before using it from Sublime.
Let me know, please, if that worked for you.

Source on save R file in Eclipse StatET

I'm starting learning R with coursera.org. I've chosen Eclipse Java Neon with StatET plugin as editor and here is my question. Is any more efficient way to loading file to R console instead writing source("file.R") after every change in this file? I mean about something like "Source on save" in RStudio.
Running R documents
What I use the most is simply selecting in the window the part I want to run and run
Ctrl+R Ctrl+R
if I want to run the whole file
CtrlA+ Ctrl+R Ctrl+R
if I want to run the R script by submitting directly
Crtl R + Ctrl D
or
right click in the document, run as
If I want to save the file first Ctrl+S
you can also use the buttons in the toolbar at the top, they will let you learn the shortcuts.
If you prefer different shortcuts.
Window>Preference>General>Keys and edit the shortcuts you want to have.

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.
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

How can I send a CLISP code to the Sublime text 3 REPL?

I'm trying to use Sublime text 3 as a common lisp (CLISP) IDE.
I installed CLISP and Sublime Text 3.
I modified Sublime Text 3 lisp package. (Lisp.sublime-build)
{
"cmd": ["clisp", "$file"],
"selector": "source.lisp"
}
I installed several Sublime Text 3 packages:
a. Package Control
b. SublimeREPL
c. Load File to REPL
After these, I can build CLISP code in my Sublime text 3, but I can't send (load) my code to Sublime Lisp REPL by "Crtl + B (Load File to REPL command)".
How can I make "Load File to REPL" package work for CLISP language in Sublime Text 3?
Thanks.
You need to start the Clisp REPL first - select Tools -> SublimeREPL -> Clisp. Then, in your Lisp source file, select Tools -> SublimeREPL -> Eval in REPL -> or ... -> Transfer to REPL -> and select the option you want. I haven't used the Load File to REPL plugin, so I don't know how well it works, but the other built-in commands I mentioned above should work just fine.

Resources