I am preparing presentations for the upcoming R workshop. That means I have to find a way to integrate R code and results into my presentations. Now I know there are a number of ways to achieve this, but I like beamer for presentations and R for analysis. Now thanks to Knitr, I can bring... Continue Reading →
World Map Visualizations Based on Data in R
I am working on a workshop for Business Analytics masters students. Part of the demos I intend to use are geographical visualizations. I am using rworldmap package to achieve these. Let us say you have geographical data in a data.frame such as country, with country identifiers stored in "ip_iso2" column in ISO2 format and the... Continue Reading →
Working with Big Data in R
This year has been crazy in terms of data I use for my analysis. Frequently the traditional methods I use in R would fail to allocate enough memory for the task at hand. Luckily, R has great support for such tasks. I will note down a few package names that have served me well lately... Continue Reading →
R and Messy Date Formats in Data
For one of my projects I am using Python scripts to scrape web pages. Unfortunately, the dates in the pages are not in a consistent format. Some are like Jun 19 2014, whereas others are 28-Mar-14, yet others are 2010-Sep-20. The trickiest ones are the ones like Jun-10. Thanks to plannapus in stack overflow I... Continue Reading →
Geolocation Matching Based on Latitudes and Longitudes in R
Today I was faced with an interesting challenge, finding time zones for users defined by latitude and longitude. Thanks to extensive package libraries of R, the solution was not hard at all. First, I found the list of cities with populations greater than 1000 in Geonames.org web site. Now the list is quite big, almost... Continue Reading →
Marketing Research Methods in SAS
I am not much of a SAS person, I feel more comfortable in R. Yet there is one area where I feel SAS excels: experimental design, especially discrete choice experiments. Now to be honest, Aizaki 2012, also presents some basic guidelines in choice experiment design but the macros are nowhere near as elegant or as... Continue Reading →
From time to time I need to use SAS for some piece of analysis. Unfortunately installing SAS requires some workarounds these days. Here is my note to self on trickier parts of SAS installation. 1- Switch to bash instead of dash 2- Install dependencies