When you create a figure (in e.g. eps format) with R, the margins around the main context are always too wide. To save the space in the final documents, e.g. LaTeX generated pdf file. I have figured out two ways of reducing the margins.If you just want to shrink the white margin of an eps… Continue reading How to crop an eps file?
Author: Feng Li
Dr. Feng Li is an Associate Professor of Statistics in the School of Statistics and Mathematics at Central University of Finance and Economics in Beijing, China. Feng obtained his Ph.D. degree in Statistics from Stockholm University, Sweden in 2013. His research interests include Bayesian computation, econometrics and forecasting, and distributed learning. His recent research output appeared in statistics and forecasting journals such as the International Journal of Forecasting and Statistical Analysis and Data Mining, AI journals such as Expert Systems with Applications, and medical journals such as BMJ Open.
Common R traps
I will show some R traps here. The purpose of this page is not going to tell you how “crappy” R is. R is great indeed and also these kind of “traps” can happen in any other languages. if(a<-5) Assume you want make a condition to check if “a is smaller than negative five“, then… Continue reading Common R traps
Command line clear R console screen
Under Linux console, you can always clear the R screen by command line cat(“\033[2J\033[H”) Note: This is not applicable to Rgui for Windows.