开发者

How to prevent extra line breaks in R console (mac)

How do I prevent the R console from adding extra line breaks when I use the up arrow to select previous commands?

When using the up arrow to select an earlier command, the R console is adding unwanted line breaks. What follows is a paste of my R console (with comments added after the fact). This is problematic when attempting to re-edit a previous line multiple times.

> ls()  #this line is entered 开发者_运维知识库by hand
character(0)
> ls()  #this gotten by <uparrow> and then <return>
character(0)
> 
> ls()  #likewise for rest of file
character(0)
> 
> 
> ls()
character(0)
> 
> 
> 
> ls()
character(0)
> 
> 
> 
> 
> ls()
character(0)
> 
> 
> 
> 
> 
> 

Easy steps to reproduce:

  1. enter a command, and press enter.
  2. hit the up arrow.
  3. hit enter.
  4. hit the up arrow.


I'm assuming your are running one of the R-MacGUIs. There is a check-box "Cleanup history entries" in the Startup panel from R/Preferences menu which I suspect you will find is unchecked on your machine. Try checking it and restarting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜