Exporting multiple graphs in same plot to PDF in R – TopBullets.com

Topbullets.comAs being a data scientist, plotting data is one of the first things we generally do. Without studying the behavior of the data we can’t or rather should not move ahead. There can be a lot of analysis which we can perform by plotting the graphs for example univariate, bivariate and residual plots. In my earlier blog, I wrote about how to plot two graphs in the same plot using par () function in R which is very useful when we do bivariate analysis and want to see the behavior of 2 variables across different time duration. Today I will write how to export the plots in PDF and in a tabular format. Generally exporting plots in any format (JPG, PDF) is an easier task but when you have say 50 graphs, you won’t want 50 pages, rather you will want 4 graphs in one page which will be very easier to read or interpret. Continue reading

Rank() Over Partition by in R – Easiest Method to Follow

Topbullets.comCurrently I am working on R, SAS and SQL languages and recently I came across a new problem. I want to rank my data set on particular columns. Ranking on a single column is very easy but when it comes for multiple columns, it becomes little tough. I Googled my problem, searched for entire day but could not find any satisfactory solution.
Finally I made my own way and it really worked. Here is the solution to this problem. Continue reading