It seems like R studio shows me code completion suggestions from datasets that I haven't used in ages. I've searched everywhere, but can't figure out how to delete these old suggestions from the drop-down menu. Where does R get its code completion suggestions from, and how can I delete irrelevant suggestions?
In the Environment tab, click on the broom icon. You will be prompted with a dialog "confirm remove objects". If you click yes this will clear all data from the environment. If you save upon exit your will start with a clean environment.
Related
When I try to clear the workspace in R console, it always pops up a dialog saying:
All objects in the workspace will be removed. Are you sure you want to proceed?
Can I have a way to disable this popup?
There are some suggestions (here) depending on your platform. Looks like passing the "no-save" option when invoking R is your best bet: https://stackoverflow.com/a/4996252/8273813
Is there any way that I can help get the "Search in history" dialog box in the orientdb-community-2.1.12 web interface to work? When I type a word into it, for instance "select" it returns "Warning You are clearing history. Are you sure?" just as if you clicked on the trash can.
I would be very happy to register this as a bug if it really is.
Sincerely,
Flint
One work around is to run the command line version of orientdb. You do this by starting the console.sh program. This keeps a shell history, and while it is not so convenient to cut and paste between windows, heck. it works.
To get a history file, reasonable way is to grep through:
orientdb/orientdb-community-2.1.12/bin/.orientdb_history
Regards,
Flint
Apologies if this is not an appropriate question, or if it is answered elsewhere, but I have done quite a bit of searching and I think I must be searching for the wrong thing...
I'm sure that in R Studio, you used to be able to click on a function which is in the Environment, to view it and see what it does. It was really easy and convenient. It doesn't work anymore. Is there another way to do this just by clicking, or is the only option to run the name of the function to get it to print in the console? I'm sure that it used to give a pop-up window where you could see the syntax highlighting and things too, which was really useful :(
I think it still works, at least in my version it does. On the upper right panel, on the top, you have a pull-down menu entitled "Global Environment". Click on this to select the package that you have loaded (or select package:base for the functions of base R), scroll down to "Functions" (there is usually a long list of "Values" before you reach that point), then click on the icon on the right side of the function that you want to see. The source code is opened in the viewer.
If this is too long a sequence to click, you can alternatively just type View(foo)in the RStudio console to display the source code of the function foo.
If I type a line of R code at the cursor and press 'Enter' I can immediately retrieve that code by pressing the up-arrow key once. However, if I am typing a line of code and accidentally press the down-arrow key once then that line of code disappears and I cannot retrieve it. This is a minor, but ever-present annoyance, most frustrating when typing data into a vector.
Is there a way to retrieve a line of code after accidentally pressing the down-arrow key?
I am using a Windows machine and the R GUI found on my desktop immediately after installation... ...I think one of the questions during installation is whether I want a short-cut on my desktop, and I select 'yes'.
this is completely dependent on the GUI. I believe (but am not certain) that RStudio, for example, preserves what you have typed.
While not a direct solution, what might be helpful is to use edit in an external window. I dont use windows, but I suspect if you hit ctrl+n you will get an editor in which you can then use F5 or ctrl+R to execute that specific line.
Personally, I use Sublime Text 2, and cmd+enter gets my code executed at the console
I found that if I open R and click File then New Script in the R menu an editor will open. I can type a line of R code in that editor. Then I can highlight that line of code and press Ctrl+R, as mentioned in Ricardo Saporta's answer and djhurio's comment. By pressing Ctrl+R that line of R code will execute. The line of R code remains visible in the editor and seems safe from being lost even if I accidentally hit the down-arrow key.
Hopefully this builds on Ricardo Saporta's answer enough to warrant being posted as another answer, although I would not have figured this out without Ricardo's and djhurio's help.
P.S.
In retrospect, I see now this is what Ricardo meant in his second comment beneath his answer.
Under R, is there a way to list all of the commands that have previously been typed?
Yes there is.
history(max.show=Inf)
IDEs for R often support this feature in a panel. RStudio, for instance, has a history tab from which you can send a previous command to the console or to your source file with a click. I believe others are similar functionality as well.