EmEditor (text editor) Forum Index
   Questions and Answers about EmEditor Core
     EmEditor as front end
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
qjunkim
Posted on: 11/22/2010 4:35 pm
Just popping in
Joined: 11/22/2010
From:
Posts: 4
EmEditor as front end
Let me first thank you for this amazingly powerful text editor.

While I was using this editor, I was wondering whether there is a way to use it as a front-end of R (statistical software).

"External Tools" allow me to run R from EmEditor in a batch mode, but will it be possible to use it for an interactive mode? I need this feature to avoid uploading libraries everytime I invoke R from EmEditor.

Thank you.

Yutaka
Posted on: 11/26/2010 10:15 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2398
Re: EmEditor as front end
Hello qjunkim,

I am sorry, but I don't know about the front-end of R. I would be glad to help you if you can show me an easy example.

Thank you!


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

qjunkim
Posted on: 12/3/2010 8:25 pm
Just popping in
Joined: 11/22/2010
From:
Posts: 4
Re: EmEditor as front end
Hi, I was thinking of EmEditor plug-in like the one in other text editor. For example, Vim-R-plugin (http://www.r-bloggers.com/r-with-vim/) allows to send individual code lines, etc. from within EmEditor.

I know this is an area of a narrow application, but I thought it would be a nice add-on to EmEditor library.

Thank you.
flamerz
Posted on: 12/5/2010 1:17 pm
Just popping in
Joined: 12/5/2010
From:
Posts: 7
Re: EmEditor as front end
qjunkim
Posted on: 12/6/2010 8:27 am
Just popping in
Joined: 11/22/2010
From:
Posts: 4
Re: EmEditor as front end
Thank you, flamerz, but I am aware of it. After reading that blog, I actually wondered whether EmEditor can be a "complete front end of R" like Vim-R-plugin (http://www.r-bloggers.com/r-with-vim/). The script you refer to allows to (i) invoke R (ii) and then process the whole command.

What I wish to be able to do is to send (i) a line or (ii) selected lines of commands from within EmEditor without having to invoke R every time I do that.
scrabbles
Posted on: 1/9/2011 8:03 pm
Just popping in
Joined: 11/15/2008
From:
Posts: 5
Re: EmEditor as front end
Hi qjunkim,

I'm the author of that blogpost (thanks muchly for posting that link here flamerz). The rrun (emeditor macro) script allows you to run only selected lines as well, though the version available will (as you say) run rterm each time.

I have modified the script, so that if a flag called "useSource" is set true, and you have a running instance of RGui + R Console (default when rgui is launched from shortcut), it will run the code in that instance and not reload rterm each time. I found it was more reliable to use the "source" command, rather than sending strings to the REPL;
eg source("C:/test.r",echo=TRUE,keep.source=TRUE)

echo and keep.source args are hardcoded in the script, but of course feel free to modify that! in r, if you are not already familiar with this command, try "help(source)" for more options.

I'll upload the script and do a little blog post about it to explain it more.
scrabbles
Posted on: 1/10/2011 1:16 am
Just popping in
Joined: 11/15/2008
From:
Posts: 5
Re: EmEditor as front end
Updated script for passing to already running RGui now uploaded.
Instructions on this post:

http://datadebrief.blogspot.com/2011/01/emeditor-r-code-macro-almost.html

Macro script download (also available using link above):
http://www.box.net/shared/n5b3xe3h7h

Any problems, feel free to let me know.

Note that i do plan on continually improving the integration of R and Emeditor, initially with this macro, but eventually a proper plugin might be required.

- Mark
qjunkim
Posted on: 1/14/2011 6:02 pm
Just popping in
Joined: 11/22/2010
From:
Posts: 4
Re: EmEditor as front end
Dear Mark,

Thank you very much for your program. I think it will be a good addition to this powerful text editor.

qjunkim
scrabbles
Posted on: 1/15/2011 8:05 pm
Just popping in
Joined: 11/15/2008
From:
Posts: 5
Re: EmEditor as front end
Hi qjunkim,

No problem, I am glad people are using it and I think EmEditor is a great program that can be a great editor for R.

Anyway, I have completely redesigned the macro, and increased it's performance and functionality, and also put it up on github, you can get a new copy of it here: The R Macro at github. I haven't written any documentation for it yet, but it is mostly intuitive, I will try to over the next couple of days.

There are now two files, thermacro.jsee, and thermacrofunctions.jsee. You'll need to download both files, but only add "thermacro.jsee" to emeditor. You'll need to alter two paths in the thermacro.jsee (like the old macro)

One for the icon (first line in macro)
#icon = "C:\Program Files\R\R-2.11.0\bin\R.exe",0

and one for the r executable directory

rbin = 'C:\\Program Files\\R\\R-2.11.0\\bin\\' //full path to r bin directory

New features:
Autostart R (minor bug with rgui at the moment though)
Many basic R commands, including loading files and plots

future things:
integrate more using rcom

If you would like other things included, just let me know.

- Mark
miley
Posted on: 1/17/2011 6:28 am
Just popping in
Joined: 1/17/2011
From:
Posts: 1
Re: EmEditor as front end
This is a great program. I tell you: with the size of the files I deal with on a daily basis, every text editor has frozen on me, or has been otherwise too slow.

This value should be posted on the front page of the website. Thanks for providing the best editor for my needs.


----------------
Anti Aging Treatments Revealed

SPSU Admissions

Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文