Retrieving Variable Declaration

前端 未结 4 1061
攒了一身酷
攒了一身酷 2021-01-25 07:34

How can I find how did I first declare a certain variable when I am a few hundred lines down from where I first declared it. For example, I have declared the following:

4条回答
  •  星月不相逢
    2021-01-25 08:04

    I will assume you're using the default R console. If you're on Windows, you can File -> Save history and open the file in your fav text browser, or you can use function savehistory() (see help(savehistory)).

    What you need to do is get a (good) IDE, or at least a decent text editor. You will benevit from code folding, syntax coloring and much more. There's a plethora of choices, from Tinn-R, VIM, ESS, Eclipse+StatET, RStudio or RevolutionR among others.

提交回复
热议问题