Blog

data.table: Swiss Army Knife for Data Wrangling

While data.table is mostly praised for its speed (which is undeniable), I was impressed with its versatility as well. The ability to manipulate the data in variety of ways using an extremely compact syntax is second to none. Sure it needs a bit of getting used to but the payoffs are phenomenal. I …

Quizme Workflow With Autoquiz

In earlier posts I have discussed in detail the design philosophy and development of quizme and autoquiz. While quizme manages the core functionality (storing quiz data and schedule quiz sessions), autoquiz works as a front end enabling to run quizme from terminal in interactive mode. Here I show …

Autoquiz: A Wrapper to Run Quizme from Terminal

Quizme is an R package that allows you to create a personalized quiz repository and enables you to learn any material efficiently. Autoquiz is a simple wrapper script that allows you to run quizme directly from the terminal window. Here I discuss the advantages of running the tool from terminal as …

Quizme Development

Quizme is an R package that allows you to create a personalized quiz repository and enables you to learn any material efficiently. Here I describe the functional logic underlying this package. I will discuss the layout of data structures employed and briefly describe the role of almost all of the …

Quizme Design

The idea of quizme started with a need to learn R more effectively as I could not spend more than few hours a day outside of my regular life. My first approach to the problem, while I thought was neat, needed a lot of manual intervention. In this design, I had two text files - one containing …

Testing and Continuous Integration in R

Often a useful function will do what we expected it to do. But sometimes it will do the unexpected. It is easy to find and address this unexpected behavior at the time of writing the function but becomes increasingly hard as the time goes by, codebase expands and dependencies become complex. To …

Quizme Introduction and Usage

While writing code for our project, we often learn new functions and concepts. Unfortunately, we also forget the new knowledge quickly. Some of you might be lucky and remember the first time you read something. For the rest of us, we need deliberate practice. Wouldn’t it be nice if we could practice …

Persistent Plotting in R

In this post, I describe the importance of persistent plots while carrying out a analysis. A case is made for simpler and persistent plots and the process to create the plots is demonstrated with an example. Finally, a package is created to stitch things together in a coherent fashion. With the …

Statistical Inference Using R

Imagine you were in the market for a new car. You care about running cost of the car and thus one of the buying criteria you have in mind is better fuel economy. One of your friend suggests to buy a 4-cylinder car instead of 6 or 8 cylinders since larger engine size usually translates to worse fuel …

Mastering R Programming

In an earlier post we learned a key ingredient needed for creating any data product - atomic vectors. If you were a chef, atomic vectors will be your main ingredient for creating the dish - rice, chicken, potatoes, eggs etc. Now we will gather the necessary tools - the pots and pans, knives, heat …

Mastering Atomic Vectors in R

Atomic vectors in R are the fundamental data structures on which other more complex data structures are built. When we are comfortable manipulating atomic vectors, it is easier and more natural to work with higher level structures like lists, data frames and tibbles. So here I focus the discussion …

Just Enough... Vim

Vim is an extremely powerful editor. It is a bit scary in the beginning but once you spend a little bit time playing with it, you would start to realize its power. One of the great advantages I feel about learning Vim (when compared to a dedicated IDE) is that it is language neutral. So if you …

Atreus Building Experience

Here I write about my atreus keyboard builing experience. Atreus is a keyboard with very unique features like small form factor, freedom to program any key the way you want, ability to work with any OS without installing any driver and the best of all - the freedom to build it with your own hands …

Building R Package using Command Line

This post describes the process of building an R package without using RStudio. This can come in handy for anyone who is using vim (and of course Nvim-R!) as a code editor for their development work. Alright, let’s get moving. We are going to create a small package offering a new ggplot theme to …

Creating a New ggplot2 Theme

This post introduces simple steps on how to create your own ggplot2 theme. Of course, it will not go into details of changing all the aspects. Instead, it will highlight the process using few useful elements. Theme is basically a set of pre-defined(default) values for elements that make up a plot in …

Just Enough... git

This is just a list of git commands I am currently using. There are tons of tutorials out there as well as quite a few cheat sheets. While those are mostly comprehensive resources, I tend to get distracted and try to learn all commands at once without using them in real projects. That doesn’t help …

US Wind Energy Production (2016)

Last week I learned while listening to NPR that Texas is at the top when it comes to wind power production among all US states. While it is a suprising fact given that Texas is a conservative state and the article is an interesting read in itself, this led me to pull some data from US Department of …

Global Sea Level Trends

This post takes a look at the global mean sea level trends as recorded by NASA since 1991. For the first 10 or so years, the observations were recorded with two measurement systems. In science, this is typically done to make sure that the instrument is not fooling us. Baking redundancy into a …