This log is very simple, because I am very unfamiliar with R, in total, I have written no more than 300 lines of code. But maybe other beginner friends will encounter similar problems, so simply summarize:
R is a very good statistic, machine learning, Big Data analysis tool (Revolution Analytics This company was just acquired by Microsoft in January 2015), but its own editor function is too simple, even the code is not highlighted, occasionally use can endure, with more than really can't stand.
This is the time to turn to sublime text such as the editor, but if only in sublime edit, and then re-loaded in Rgui, and then right-click "Run the current line or selected code", it is still too troublesome. A simpler approach is to add its bin directory to environment variables (for example, Windows systems). As I'm going to add D:\Program files\r\r-3.1.2\bin to the PATH environment variable of the Windows system, and then the cmd window navigates to the location of the R code, run: Rscript file name. R, you can run the script under CMD. The advantage is that after editing in Sublime, press the UP arrow in Cmd-enter. That is, you can rerun the script, which is much more efficient than reloading and re-running in Rgui. This is the experience, summed up.
How to efficiently use an editor such as sublime text when writing R language code