How many days until?

A simple little macro I whipped up that’ll count down the number of days until an important event. %macro daysUntil(event, date); data _null_; diff = datdif(today(), input(“&date.”, anydtdte10.), ‘act/act’); call symput(‘days_until’, strip(diff)); run; %put There are &days_until days until &event; %mend; Macro call is straight forward: %daysUntil(Christmas, 12/25/2011); %daysUntil(Columbia_Marathon, 03/10/2012); I could have used various […]

Too many pies can be hard to digest

On his SAS and R blog, Ken K. recently posted an example of a visualization technique called “small multiples”. In this exercise, Ken shows the programming technique for replicating a particular series of pie charts in R as well as in SAS. It’s a useful exercise to learn from, but […]

Those most productive R developers

The number of R packages on CRAN is 3,483 on 2011-12-12. The growth of R package in the past years can be fitted by a quadratic regression perfectly.

I am always interested in who are maintaining those packages. Then I wrote an R script to extract …

Building custom measures for OLAP cubes

In one minute (and 10 seconds, but are you measuring that?) you can add a custom measure (also known as calculated members) to your OLAP cube. Watch this video to create a simple calculation multiplying units * price. Remember that this mechanism is no…