As a R user with 5 years experience, I still have some basic functions that never used or never thought they could exist. Many times I was suprised with some elegant R functions, such like strwidth, parent.frame, etc. No one can know all R functions (and it’s unnecessary), but it’s very convenient to know some basic functions, especially those in the basic packages: base, utils, stats, etc.
I used to have a learning plan: learn one R function a day. But it was terminated because I always fail to remember it. Today, once again I found a useful function of the basic package base, which impelled me to keep learning R as a daily work. How could one guy who said he has 5 years experience but still doesn’t know some basic functions?!
My plan is simple: everyday I log on my computer, one of the first tasks is reading one topic-help document. To avoid forgetting to do this, I need the help page appears automatically.
So, I need to build a topic list first, and I want to start with the base package. The following is my code:
1 2 3 4 5 6 7 8 9 10 11 12 | |
Then I need to choose an order to load the topic one by one. The function parent.frame(2)$ofile is used to get current script’s absolute path.
1 2 3 4 5 6 | |
The last step is creating a .bat file to run the R code in a batch mode, and add that file to your Task Scheduler and set the trigger as “at log on”. The content of the .bat file looks like this:
1
| |
Any kind of criticism or commet are welcome!
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series,ecdf, trading) and more...

Zero Inflated Models and Generalized Linear Mixed Models with R.
Zuur, Saveliev, Ieno (2012).