Monthly Archives: June 2013

How American Century revolutionized their investment platform with R

June 20, 2013
By
How American Century revolutionized their investment platform with R

American Century Investments is a top-20 mutual fund company with more than 125 billion dollars of assets under management. The quantitative investment group manages 22 funds, and takes an objective, systematic and disciplined approach to determine which stocks to buy and sell. Real-time data and carefully calibrated statistical models are the foundation of this quantitative approach. This group formerly...

Read more »

Datagrabbing Commonly Formatted Sheets from a Google Spreadsheet – Guardian 2014 University Guide Data

June 20, 2013
By
Datagrabbing Commonly Formatted Sheets from a Google Spreadsheet – Guardian 2014 University Guide Data

So it seems like it’s that time of year when the Guardian publish their university rankings data (Datablog: University guide 2014), which means another opportunity to have a tinker and see what I’ve learned since last year… (Last year’s hack was a Filtering Guardian University Data Every Which Way You Can…, where I had a

Read more »

Bayesian Modeling of Anscombe’s Quartet

June 20, 2013
By
Bayesian Modeling of Anscombe’s Quartet

Anscombe’s quartet is a collection of four datasets that look radically different yet result in the same regression line when using ordinary least square regression. The graph below shows Anscombe’s quartet with imposed regression lines (taken from the Wikipedia article).While least square regression is a good choice for dataset 1 (upper left plot) it...

Read more »

Installing the RGoogleAnalytics package

June 20, 2013
By
Installing the RGoogleAnalytics package

In this blog post, I would walk you through the steps from downloading to installing the RGoogleAnalytics package on your machine. The RGoogleAnalytics package currently resides at https://code.google.com/p/r-google-analytics/ and this page lists the latest developments around the package. The zip and tarball archives for the package can be obtained from the Downloads Section. Once you download the

Read more »

Update to curves2d()

June 20, 2013
By

(This article was first published on geomorph, and kindly contributed to R-bloggers) Dear morphometricians, Below you will find an update to our function for digitizing curves in 2d: curves2d(). This solves a problem with the function plotting landmarks and semilandmarks out of sequence. To use it, you can "source()" the code from a directory, or copy and paste it...

Read more »

Using the Windows Clipboard, or Passing Data Quickly From Excel to R and Back Again

June 19, 2013
By
Using the Windows Clipboard, or Passing Data Quickly From Excel to R and Back Again

Two of my favorite functions are copy.table() and paste.table(). I’m going to turn this story on its head and give you the ending first. The first allows you to copy a data frame to the clipboard in a format that … Continue reading →

Read more »

literacy rates using semantics and R

June 19, 2013
By
literacy rates using semantics and R

(This article was first published on - R, and kindly contributed to R-bloggers) Somehow I stumbled into the world of linked open data trying to pull information easily off of a wikipedia page without having to write a customer scrapper. Enter in dbpedia, semantic technologies and some wonderful R packages take care of the back-end coding. The Research Group...

Read more »

A Toy Instrumental Variable Application

June 19, 2013
By
A Toy Instrumental Variable Application

Draw nicer Classification and Regression Trees with the rpart.plot package

June 19, 2013
By
Draw nicer Classification and Regression Trees with the rpart.plot package

by Joseph Rickert The basic way to plot a classification or regression tree built with R’s rpart() function is just to call plot. However, in general, the results just aren’t pretty. As it turns out, for some time now there has been a better way to plot rpart() trees: the prp() function in Stephen Milborrow’s rpart.plot package. This function...

Read more »

Spatial Overlays with R – Retrieving Polygon Attributes for a Set of Points

June 19, 2013
By

A short tutorial for spatial overlays using R-GIS..library(sp)library(dismo)# spatial dataalt gadm # viewplot(alt)plot(gadm, add=T)# some addressespts # make it spatialcoords spdf_pts # assign CRS/projectionproj4string(spdf_pts) # check datastr(spdf_pts)# plot it on topplot(spdf_pts, cex = 2, col = 2, add = T)# do an intersection (points in polygon)# yielding the polygon's attribute dataover(spdf_pts, gadm)

Read more »