Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #9110
    qjunkim
    Participant

    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.

    #9125
    Yutaka Emura
    Keymaster

    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!

    #9138
    qjunkim
    Participant

    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.

    #9140
    flamerz
    Member
    #9143
    qjunkim
    Participant

    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.

    #9184
    scrabbles
    Member

    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.

    #9185
    scrabbles
    Member

    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

    #9192
    qjunkim
    Participant

    Dear Mark,

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

    qjunkim

    #9198
    scrabbles
    Member

    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 FilesRR-2.11.0binR.exe”,0

    and one for the r executable directory

    rbin = ‘C:Program FilesRR-2.11.0bin’ //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

    #9201
    miley
    Member

    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.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.