Tag Archives: R

Summary statistics by group with R

I was working on profiling some code today and wanted to obtain some summary statistics by groups with two factors. The original source was a log4j file that included entries from an aspect based logger I had enabled. I had already written a small perl script to extract the pertinent information and generate a CSV file with (clazz,method,elapsed) entries, so I was looking for some standard statistics like mean, median, etc. based on clazz+method combinations.
Continue reading Summary statistics by group with R

More Quick R Maps: Country View of WHO Confirmed Cases

who_world_swineflu_04282009.png

I realized it should be pretty easy to use the approach as the previous R map I generated to make a smaller scale map at a country level. In this example I’m setting up an initial non-plotted map with limits on the X and Y ranges I want to display. Next I assign colors to the observations of this subset map, plot these filled areas, then plot all boundaries.
Continue reading More Quick R Maps: Country View of WHO Confirmed Cases