Re: [R] Re: [R-gui] Editor in R

2004-04-08 Thread Rory Campbell-Lange
On 07/04/04, Duncan Murdoch ([EMAIL PROTECTED]) wrote:
 S?ren H?jsgaard wrote:

 I'm on a PC and have VIM, a VI clone that I love.  Is it possible and
 relatively easy to replace the Emacs editor with one like that which
 you already have?
 
 Does VIM have a way to run a program that uses stdin, stdout and
 stderr, capturing the input and output?

On my linux system, with my environmental variables pointing to vim, the
command

edit()

puts me into a vim buffer.

You may want to discover if you can get readline support for R too, as
it is great being able to use vi keybindings to surf through the command
history and do quick and easy cutting and pasting.

eg: ESC2kgoes up two commands
ESC/abs  find the first line with 'abs'
n  find the next line with 'abs'
W  move to the second word on a line
d$ delete from second word to end into buffer
p  paste

Rory
-- 
Rory Campbell-Lange 
[EMAIL PROTECTED]
www.campbell-lange.net

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Re: [R-gui] Editor in R

2004-04-07 Thread Bob Cain


Søren Højsgaard wrote:

Dear all,
I have used R (Windows) for teaching statistics to agronomists and biologists - and they love R!! Yet there is one immediate short coming of R: The lack of an integrated editor. A plain editor (e.g. similar to notepad in windows) in which people can write their code, highlight the piece of code they wish to submit and then press a single key to have it pasted into R. 

For the audience I have in mind, using emacs is way too complicated. WinEdt with the R-extension is probably also too difficult for them (though I have not tried), and at it certainly would move the focus away from statistics to get these technical things up-and-running. 

If I knew how to make such a simple editor within R (as an add-on package) then I would do it - but this goes way beyond my capabilities. I would therefore like to encourage anyone in the GUI group with such technical skills to make such an editor. It would be appreciated by many R-beginners...

I'm on a PC and have VIM, a VI clone that I love.  Is it
possible and relatively easy to replace the Emacs editor
with one like that which you already have?
Thanks,

Bob
--
Things should be described as simply as possible, but no
simpler.
 A. Einstein

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Re: [R-gui] Editor in R

2004-04-07 Thread Duncan Murdoch
On Wed, 07 Apr 2004 13:33:17 -0700, Bob Cain
[EMAIL PROTECTED] wrote :


Søren Højsgaard wrote:

 Dear all,
 I have used R (Windows) for teaching statistics to agronomists and biologists - and 
 they love R!! Yet there is one immediate short coming of R: The lack of an 
 integrated editor. A plain editor (e.g. similar to notepad in windows) in which 
 people can write their code, highlight the piece of code they wish to submit and 
 then press a single key to have it pasted into R. 
 
 For the audience I have in mind, using emacs is way too complicated. WinEdt with 
 the R-extension is probably also too difficult for them (though I have not tried), 
 and at it certainly would move the focus away from statistics to get these 
 technical things up-and-running. 
 
 If I knew how to make such a simple editor within R (as an add-on package) then I 
 would do it - but this goes way beyond my capabilities. I would therefore like to 
 encourage anyone in the GUI group with such technical skills to make such an 
 editor. It would be appreciated by many R-beginners...
 

I'm on a PC and have VIM, a VI clone that I love.  Is it
possible and relatively easy to replace the Emacs editor
with one like that which you already have?

Does VIM have a way to run a program that uses stdin, stdout and
stderr, capturing the input and output?  That's how ESS does it in
Emacs.  If so, then it could run Rterm that way, and handle the
console display itself.  You might want to run using the --ess command
line option (but you'll have to check the source code to see exactly
what it does, I forget).

Duncan Murdoch

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Re: [R-gui] Editor in R

2004-04-07 Thread Peter Dalgaard
Bob Cain [EMAIL PROTECTED] writes:

 I'm on a PC and have VIM, a VI clone that I love.  Is it
 possible and relatively easy to replace the Emacs editor
 with one like that which you already have?

Depends on what for. There are R commands that involve calling up an
editor on a file and getting a modified file back (fix(myfun) e.g.).
That editor is completely customizable by options(editor=). On
Unix-alikes the default is your $EDITOR setting and on Windows I
believe it is Notepad.

However, it is possible to wire up Emacs so that R runs in one of its
text buffers and you can can easily send blocks of code to that
process. This can be difficult to clone with other editors, but AFAIR
WinEdt can do something similar. Wouldn't know about Vim.

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Re: [R-gui] Editor in R

2004-04-07 Thread Randy Zelick
Hello there,

I have been using WinEdt as a text editor for a while. I use it in a
simple general purpose way, and take advantage of just a few of the 100's
(1000s?) of features. I would say that used this way it is certainly not
more difficult than R. So it would seem that if you are successful
teaching R to biologists, additionally learning WinEdt should not push
anyone over the edge.

Still, another alternative is Pico, which you can get for free for
Windoze.

By the way, although Notepad works for R scripts, when I tried Wordpad it
did not. Probably puts whacko crapola at the end of each line.

Cheers,

=Randy=

R. Zelick   email: [EMAIL PROTECTED]
Department of Biology   voice: 503-725-3086
Portland State University   fax:   503-725-3888

mailing:
P.O. Box 751
Portland, OR 97207

shipping:
1719 SW 10th Ave, Room 246
Portland, OR 97201

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html