Re: [R] Command-line editing history

2006-03-03 Thread John McHenry
Unless, of course, like me, you run vim for religious reasons ;)
 
 Seriously, though, it seems that this functionality is not available in the R 
Console, correct?

I have tried many GUI front-ends and found that there are both advantages and 
unfortunately disadvantages to their use---certainly in the way that I normally 
work---hence the best solution, for me at least, would be to have added 
functionality in the R Console.

Liaw, Andy [EMAIL PROTECTED] wrote: Unless I'm mistaken, all those features 
(and more) are available if you run
R within ESS/(X)Emacs.

Andy

From: John McHenry
 
Hi all,
 
 Are there any plans to add more functionality to command-line 
 editing and history editing on the command line?
 
 In MATLAB (I know, comparisons are odious ...), you can type 
 p and up-arrow on the command line and scroll through the 
 recently entered commands beginning with p. This is a very 
 useful  feature and something that I believe is not replicated in R. 
 Please correct me if I'm wrong; currently I use history(Inf) 
 in R, search for what I want and cut and paste if I find what 
 I'm looking for.
 
 Also in MATLAB, tab completion is available for directory 
 listings and also for function name completion. Again, I'm 
 unaware of how to do this in R. The added MATLAB  
 functionality makes finding files easy on the command line 
 and it also saves the fingers on long function names. 
 
 Thanks,
 
 Jack.
 
   
 -
 
 
  [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list 
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 


--

--



-


[[alternative HTML version deleted]]

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


Re: [R] Command-line editing history

2006-03-03 Thread Jeffrey Horner
John McHenry wrote:
Hi all,
 
 Are there any plans to add more functionality to command-line editing and 
 history editing on the command line?

Presuming you're running R from a Unix console (I'm unsure of the 
windows port, maybe?), it is sufficient, insofar as how well you like 
the GNU readline library and if it's been compiled into R:

http://cnswww.cns.cwru.edu/php/chet/readline/rluserman.html

I can even use VI style key bindings to work with historical commands: 
Typing K recalls previous commands, J goes forward through the commands. 
I can even search through the commands. Auto completion of function 
names doesn't work but file names do.

One point that was a bit of work for me to set up was automatically 
saving history. In order to do this, you must first set the environment 
variable R_HISTFILE to the location of your saved history file. Then, at 
the end of your R session, you can run:

savehistory(Sys.getenv(R_HISTFILE)

Or better yet, put the following in your .Rprofile:

.Last - function() savehistory(Sys.getenv(R_HISTFILE))

 
 In MATLAB (I know, comparisons are odious ...), you can type p and up-arrow 
 on the command line and scroll through the recently entered commands 
 beginning with p. This is a very useful  feature and something that I 
 believe is not replicated in R. 
 Please correct me if I'm wrong; currently I use history(Inf) in R, search for 
 what I want and cut and paste if I find what I'm looking for.
 
 Also in MATLAB, tab completion is available for directory listings and also 
 for function name completion. Again, I'm unaware of how to do this in R. The 
 added MATLAB  functionality makes finding files easy on the command line and 
 it also saves the fingers on long function names. 
 
 Thanks,
 
 Jack.
 
   
 -
 
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


-- 
Jeffrey Horner   Computer Systems Analyst School of Medicine
615-322-8606 Department of Biostatistics   Vanderbilt University

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


Re: [R] Command-line editing history

2006-03-03 Thread Martin Maechler
 John == John McHenry [EMAIL PROTECTED]
 on Fri, 3 Mar 2006 07:07:11 -0800 (PST) writes:

John Unless, of course, like me, you run vim for religious reasons ;)
John Seriously, though, it seems that this functionality is not available 
in the R Console, correct?

John I have tried many GUI front-ends and found that there are both 
advantages and unfortunately disadvantages to their use---certainly in the way 
that I normally work---hence the best solution, for me at least, would be to 
have added functionality in the R Console.

John,

I think you never said on which platform (Unixish / Mac /
Windows) you work, since the consoles differ.
But in all three cases, everything is built on free software
(contrary to Matlab),  so you could go ahead and improve the
console behavior and post the improved sources for future
inclusion.   

One advantage in using ESS has been that you have the (almost)
identical interface on all computer platforms.

Regards,
Martin Maechler ETH Zurich

John Liaw, Andy [EMAIL PROTECTED] wrote: Unless I'm mistaken, all 
those features (and more) are available if you run
John R within ESS/(X)Emacs.

John Andy

John From: John McHenry
 
 Hi all,
 
 Are there any plans to add more functionality to command-line 
 editing and history editing on the command line?
 
 In MATLAB (I know, comparisons are odious ...), you can type 
 p and up-arrow on the command line and scroll through the 
 recently entered commands beginning with p. This is a very 
 useful  feature and something that I believe is not replicated in R. 
 Please correct me if I'm wrong; currently I use history(Inf) 
 in R, search for what I want and cut and paste if I find what 
 I'm looking for.
 
 Also in MATLAB, tab completion is available for directory 
 listings and also for function name completion. Again, I'm 
 unaware of how to do this in R. The added MATLAB  
 functionality makes finding files easy on the command line 
 and it also saves the fingers on long function names. 
 
 Thanks,
 
 Jack.
 
 
 -
 
 
 [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list 
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 


John 
--

John 
--



John -


John [[alternative HTML version deleted]]

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

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


Re: [R] Command-line editing history

2006-03-03 Thread John McHenry
Oops, should have included:

 version
 _  
platform i386-pc-mingw32
arch i386   
os   mingw32
system   i386, mingw32  
status  
major2  
minor2.1
year 2005   
month12 
day  20 
svn rev  36812  
language R

So, no, I'm on the Windoze port. 

So I guess my question changes to: Does anyone know if there are plans / is it 
possible to add GNU Readline functionality in the Windoze port?

I especially like the fact that vi key bindings are available ;)

Thanks,

Jack.

Jeffrey Horner [EMAIL PROTECTED] wrote: John McHenry wrote:
Hi all,
 
 Are there any plans to add more functionality to command-line editing and 
 history editing on the command line?

Presuming you're running R from a Unix console (I'm unsure of the 
windows port, maybe?), it is sufficient, insofar as how well you like 
the GNU readline library and if it's been compiled into R:

http://cnswww.cns.cwru.edu/php/chet/readline/rluserman.html

I can even use VI style key bindings to work with historical commands: 
Typing K recalls previous commands, J goes forward through the commands. 
I can even search through the commands. Auto completion of function 
names doesn't work but file names do.

One point that was a bit of work for me to set up was automatically 
saving history. In order to do this, you must first set the environment 
variable R_HISTFILE to the location of your saved history file. Then, at 
the end of your R session, you can run:

savehistory(Sys.getenv(R_HISTFILE)

Or better yet, put the following in your .Rprofile:

.Last - function() savehistory(Sys.getenv(R_HISTFILE))

 
 In MATLAB (I know, comparisons are odious ...), you can type p and up-arrow 
 on the command line and scroll through the recently entered commands 
 beginning with p. This is a very useful  feature and something that I 
 believe is not replicated in R. 
 Please correct me if I'm wrong; currently I use history(Inf) in R, search for 
 what I want and cut and paste if I find what I'm looking for.
 
 Also in MATLAB, tab completion is available for directory listings and also 
 for function name completion. Again, I'm unaware of how to do this in R. The 
 added MATLAB  functionality makes finding files easy on the command line and 
 it also saves the fingers on long function names. 
 
 Thanks,
 
 Jack.
 
   
 -
 
 
  [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


-- 
Jeffrey Horner   Computer Systems Analyst School of Medicine
615-322-8606 Department of Biostatistics   Vanderbilt University



-


[[alternative HTML version deleted]]

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


Re: [R] Command-line editing history

2006-03-03 Thread Prof Brian Ripley
On Fri, 3 Mar 2006, John McHenry wrote:

 Oops, should have included:

 version
 _
 platform i386-pc-mingw32
 arch i386
 os   mingw32
 system   i386, mingw32
 status
 major2
 minor2.1
 year 2005
 month12
 day  20
 svn rev  36812
 language R

 So, no, I'm on the Windoze port.

 So I guess my question changes to: Does anyone know if there are plans / 
 is it possible to add GNU Readline functionality in the Windoze port?

No plans, especially as Rterm.exe already has getline with very similar 
functionality.  But of course you are welcome to contribute your own 
Windows console with readline functionality.  We look forwards to hearing 
how you get on.


-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


[R] Command-line editing history

2006-03-02 Thread John McHenry
   Hi all,

Are there any plans to add more functionality to command-line editing and 
history editing on the command line?

In MATLAB (I know, comparisons are odious ...), you can type p and up-arrow 
on the command line and scroll through the recently entered commands beginning 
with p. This is a very useful  feature and something that I believe is not 
replicated in R. 
Please correct me if I'm wrong; currently I use history(Inf) in R, search for 
what I want and cut and paste if I find what I'm looking for.

Also in MATLAB, tab completion is available for directory listings and also for 
function name completion. Again, I'm unaware of how to do this in R. The added 
MATLAB  functionality makes finding files easy on the command line and it also 
saves the fingers on long function names. 

Thanks,

Jack.


-


[[alternative HTML version deleted]]

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


Re: [R] Command-line editing history

2006-03-02 Thread Liaw, Andy
Unless I'm mistaken, all those features (and more) are available if you run
R within ESS/(X)Emacs.

Andy

From: John McHenry
 
Hi all,
 
 Are there any plans to add more functionality to command-line 
 editing and history editing on the command line?
 
 In MATLAB (I know, comparisons are odious ...), you can type 
 p and up-arrow on the command line and scroll through the 
 recently entered commands beginning with p. This is a very 
 useful  feature and something that I believe is not replicated in R. 
 Please correct me if I'm wrong; currently I use history(Inf) 
 in R, search for what I want and cut and paste if I find what 
 I'm looking for.
 
 Also in MATLAB, tab completion is available for directory 
 listings and also for function name completion. Again, I'm 
 unaware of how to do this in R. The added MATLAB  
 functionality makes finding files easy on the command line 
 and it also saves the fingers on long function names. 
 
 Thanks,
 
 Jack.
 
   
 -
 
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list 
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


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


Re: [R] Command-line editing history

2006-03-02 Thread ronggui
And JGR has that features as well.

2006/3/3, Liaw, Andy [EMAIL PROTECTED]:
 Unless I'm mistaken, all those features (and more) are available if you run
 R within ESS/(X)Emacs.

 Andy

 From: John McHenry
 
 Hi all,
 
  Are there any plans to add more functionality to command-line
  editing and history editing on the command line?
 
  In MATLAB (I know, comparisons are odious ...), you can type
  p and up-arrow on the command line and scroll through the
  recently entered commands beginning with p. This is a very
  useful  feature and something that I believe is not replicated in R.
  Please correct me if I'm wrong; currently I use history(Inf)
  in R, search for what I want and cut and paste if I find what
  I'm looking for.
 
  Also in MATLAB, tab completion is available for directory
  listings and also for function name completion. Again, I'm
  unaware of how to do this in R. The added MATLAB
  functionality makes finding files easy on the command line
  and it also saves the fingers on long function names.
 
  Thanks,
 
  Jack.
 
 
  -
 
 
[[alternative HTML version deleted]]
 
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
  http://www.R-project.org/posting-guide.html
 
 

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



--
黄荣贵
Deparment of Sociology
Fudan University

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