Linear regression is one of the most commonly used statistical technique to understand relationship between two quantitative variables (in the simplest case). Simple linear regression models relationship between two variables X and Y, where X and Y are vectors with multiple values. For example, X could how well each country is doing economically, like GDP […]
tidyr 1.0.0 is here. pivot_longer & pivot_wider replace spread & gather
tidyr version 1.0.0 is here with a lot of new changes. tidyr has been around for about five years and it has finally tidyr has reached version 1.0.0. There are four big changes in the new version of tidyr. One of the biggest changes is the new functions pivot_longer() and pivot_wider() for reshaping tabular dataserts. […]
How to Create Ordered Dictionary in Python?
Dictionary in Python is one of the most useful core data structures in Python. Sometimes, you may want to create a dictionary and also maintain the order of items you inserted when you are iterating the keys. Python’s collections module has OrderedDict that lets you create a ordered dictionary. Let us see an example of […]
How to Make a R Package from Scratch using RStudio
Creating your first R package from scratch can look really daunting at first. The modern toolkits like RStudio IDE and devtools R package make it a lot easier to get started and create a new R package. Recently came across the second edition of R Packages book by Hadley Wickham and Jenny Bryan and it […]
Pearson and Spearman Correlation in Python
Understanding relationship between two or more variables is at the core of many aspects of data analysis or statistical analysis. Correlation or correlation coefficient captures the association between two variables (in the simplest case), numerically. One of the commonly used correlation measures is Pearson correlation coefficient. Another commonly used correlation measure is Spearman correlation coefficient. […]



