Monthly Archives: December 2012

NFL Prediction – Algorithm 1

December 5, 2012
By
NFL Prediction – Algorithm 1

So I tidied the code up a bit from last time; no more for loop. Actually, I tidied it up a lot. My goal had been to arrange the data in such a way that I could get a simple moving average of the score difference for each team. That wound up being a semi-lengthy

Read more »

modified wp-codebox to highlight R code as in Pretty-R

December 5, 2012
By

I found wp-codebox could highlight R code two years ago. This plugin is based on GeSHi to highlight source code internally.Now there are many ways to highlight R syntax in the website. Pretty-R provided by Inside-R is a popular tool in the community.Read more »

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 »