Command history in R

谁说胖子不能爱 提交于 2019-12-03 14:52:41

问题


Is there any IDE -from the ones supporting R-, that gives access to the command history (at least to the current session's commands)? Or is there a way to get a (character or expression) vector with those commands in R?

For those of you that have been using MATLAB, I mean something like the Command History window there..

Thank you


回答1:


history(Inf)

opens a window similar to that in MATLAB.




回答2:


savehistory('file')
myhistory <- scan('file','character')

Might do the trick.




回答3:


I would highly recommend to use Emacs with ESS (Emacs speaks Statistic)




回答4:


Eclipse with Stat-ET plugin will get you command history window and object browser.




回答5:


The OS X GUI for R has a very nice command history mechanism built in. It works well with multi-line commands (e.g. long function definitions), and you can browse through the history in a pane on the side of the window.




回答6:


The command history() will recall the last 25 used commands, whereas history(max.show=Inf)will get back all previous ones. If you are using RStudio on top of your R distro, CTRL + UP will give you the list of all previous commands.



来源:https://stackoverflow.com/questions/2749390/command-history-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!