Monthly Archives: December 2012

write.table with proper column number in the header

December 5, 2012
By

Did you notice that the file generated from write.table() in R has missed a tab (\t) in the top-left corner, when row.names=T (by default)?I found the solution here:http://stackoverflow.com/questions/2478352/write-table-in-r-screws-up-header-when-has-r...

Read more »

Forbes Graph Makeover Contest Entry #1

December 5, 2012
By
Forbes Graph Makeover Contest Entry #1

Naomi Robbins is running a graph makeover challenge over at her Forbes blog and this is my entry for the B2B/B2C Traffic Sources one (click for larger version): And, here’s the R source for how to generate it: library(ggplot2)   df = read.csv("b2bb2c.csv")   ggplot(data=df,aes(x=Site,y=Percentage,fill=Site)) + geom_bar(stat="identity") + facet_grid(Venue ~ .) + coord_flip() + opts(legend.position

Read more »

Population dynamics using INLA

December 5, 2012
By
Population dynamics using INLA

Summary: Two methods of inferring (effective) population dynamics from genetic variation are compared: (i) Markov chain Monte Carlo (MCMC; using BEAST); and (ii) integrated nested Laplace approximation (INLA; using R interface of that name). INLA runs >1000 times faster than … Continue reading →

Read more »

Bottom-up creation of data-driven capabilities: show don’t tell

December 5, 2012
By
Bottom-up creation of data-driven capabilities: show don’t tell

I’ve been writing lately on what to do when people who make decisions in an organization say they want data-driven capabilities but then ignore or attack the results of data-driven analysis for not saying what they think the data ought to say. Some of the most productive things you can do in that situation include

Read more »

APSRtable: Getting Tables from R to \( \LaTeX \)

December 5, 2012
By
APSRtable: Getting Tables from R to \( \LaTeX \)

Oftentimes you might be writing in LaTeX and trying to push your results from R into your .tex file. This, at times, can be very frustrating. Luckily, there’s apsrtable, an R package that automatically produces the LaTeX code for your  R model ...

Read more »

Modis QC Bits

December 5, 2012
By
Modis QC Bits

In the course of working through my MODIS  LST project and reviewing the steps that Imhoff and Zhang took as well has the data preparations other researchers have taken ( Neteler ) the issue of MODIS Quality control bits came up.  Every MODIS  HDF file comes with multiple SDS or multiple layers of data. For

Read more »

Function Closures and S4 Methods

December 4, 2012
By
Function Closures and S4 Methods

This brief tutorial illustrates how to combine S4 object oriented capabilities with function closures in order to develop classes with built in methods. Thanks to Hadley Wickham for the great contribution of material and tutorials made available on the web and to Bill Venables and Stefano Iacus for their kind reviews. Regular … Continue reading →

Read more »

Plotting Likert Scales

December 4, 2012
By
Plotting Likert Scales

Graphs can provide an excellent way to emphasize a point and to quickly and efficiently show important information. Sadly, poor graphs can be a good way to waste space in an article, take up time in a presentation, and waste a lot of ink all while providing little to no information. Excel has made it

Read more »

Shiny Server – Earthshattering News

December 4, 2012
By
Shiny Server – Earthshattering News

As you probably know, I am one of the strongest proponents of the Shiny package for developing interactive web applications Amongst the latest news from RStudio is that what was planned to be commercial software will now be free and Open Source (AGPLv3 license) To celebrate this momentous announcement, I have produced an Earthquake app.

Read more »

Amazon associates links (warnin’)

December 4, 2012
By
Amazon associates links (warnin’)

As in previous years, let me warn unwary readers that the links to Amazon.com and Amazon.fr found on this blog are actually susceptible to earn me a monetary gain if a purchase is made in the 24 hours following the entry on Amazon through this link, thanks to the “Amazon Services

Read more »