Monthly Archives: December 2012

How a Mexican state ended up with more drug war homicides than total homicides

December 5, 2012
By
How a Mexican state ended up with more drug war homicides than total homicides

During 2007 and 2008 the Mexican state of Sinaloa had more drug war-related homicides than total homicides. This should in theory be impossible since drug war homicides are a subset of total homicides. How did this happen? Here is a chart from my old post highlighting the monthly difference between the...

Read more »

TFX Package

December 5, 2012
By
TFX Package

Today I want to highlight the TFX Package created by Garrett See. TFX is an R Interface to the TrueFX(tm) Web API for free streaming real-time and historical tick-by-tick market data for dealable interbank foreign exchange rates with millisecond detail. Garrett provided a great tutorial, examples, and shiny application of TFX at http://rpubs.com/gsee/TFX Please note

Read more »

RInside 0.2.10

December 5, 2012
By

The new maintenance release 0.2.10 of RInside is now on CRAN, including Windows binaries. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided ...

Read more »

Shiny released to CRAN; Shiny Server coming soon

December 5, 2012
By

The shiny package, the R package from RStudio that makes it easy to build simple interactive interfaces for R scripts, is now available on CRAN. This will make it easier for R programmers to install and use shiny, and to run the interfaces they create from a local web browser. The next step is to be able to publish...

Read more »

Loading Big files in R

December 5, 2012
By
Loading Big files in R

Far as I remember, today was the first day in my life I succeed to load a text file bigger than 1.5 Gb into R (~ 5 million lines and 18 columns). My computer is not a small stuff, I’m using a Macbook Pro with rough 8GB of RAM, but the issue why I couldn’t

Read more »

Speed up your map plotting in R

December 5, 2012
By
Speed up your map plotting in R

I have been forever annoyed at how long it takes to plot data on a large shapefile. And this is a domain where doesn’t matter if you’re working with MapInfo or R. Just zooming the figure takes ages. But a … Continue reading →

Read more »

Apple Compared to Others with ggthemes

December 5, 2012
By
Apple Compared to Others with ggthemes

For a happy person delightfully concentrated in Apple, I wanted to show Apple’s performance versus Microsoft and Cisco in decades 1(1990-2000) and 2 (2000-2012).  I thought this would give me a good chance to try out the very interesting work be...

Read more »

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 »