Monthly Archives: April 2013

Package-Wide Variables/Cache in R Packages

April 8, 2013
By

It’s often beneficial to have a variable shared between all the functions in an R package. One obvious example would be the maintenance of a package-wide cache for all of your functions. I’ve encountered this situation multiple times and always forget at least one important step in the process, so I thought I’d document it

Read more »

painful truncnorm

April 8, 2013
By
painful truncnorm

As I wanted to simulate truncated normals in a hurry, I coded the inverse cdf approach: instead of using my own accept-reject algorithm. Poor shortcut as the method fails when a and b are too far from μ So I introduced a control (and ended up wasting more time than if I had used my

Read more »

Instructions for Installing & Using R on Amazon EC2

April 8, 2013
By

If you’re an R user, you’ve surely heard all the hype around ‘big data’ and how R is commonly used to analyze these volumes of data. One thing that’s often missing from the discussion is HOW to work around issues using big data and R, specifically how to deal with the fact that R stores Instructions for Installing...

Read more »

Use foursquare to locate a twitter user using R

April 8, 2013
By
Use foursquare to locate a twitter user using R

I've been doing some work with Twitter data. In much of this work, my life would be so much easier if we could geographically locate the origin of the tweets. There are some ways to do this using the twitter APIs. For example, if a user has geo-locatio...

Read more »

Visualize large data sets with the bigvis package

April 8, 2013
By
Visualize large data sets with the bigvis package

Creating visualizations of large data sets is a tough problem: with a limited number of pixels available on the screen (or just with the limited visual acuity of the human eye), massive numbers of symbols on the page can easily result in an uninterpretable mess. On Friday we shared one way of tackling the problem using Revolution R Enterprise:...

Read more »

Halo Effects vs. Intention-Laden Ratings: Separating Baby and Bathwater

April 8, 2013
By
Halo Effects vs. Intention-Laden Ratings: Separating Baby and Bathwater

Are halo effects real or illusory?  Much has been written arguing that rating scales contain extensive amounts of measurement bias.  Some tells us to avoid ratings altogether (What do customers really want?).  Others warn against the use of ratings scales without major adjustments (e.g., overcoming scale usage heterogeneity with the R package bayesm).  Obviously, by including the...

Read more »

More variables, spinoff projects, and RuPaul’s Drag Race season 5 predictions: episode 10

April 8, 2013
By
More variables, spinoff projects, and RuPaul’s Drag Race season 5 predictions: episode 10

Last week, Alyssa got the boot and Jinkx kept her place. And I totally called it with my first model that accounted for the proportional hazards assumption. I think the model is having a little more success as the season plods on. Before I get to the predictions for episode 10, there’s two really interesting… Continue reading →

Read more »

Spring Cleaning Data: 1of 6- Downloading the Data & Opening Excel Files

April 8, 2013
By

With spring in the air, I thought it would be fun to do a series on (spring) cleaning data. The posts will follow my efforts to to download the data, import into R, cleaned it up, merge the different files, add columns of information created, and then ...

Read more »

Starting Analysis and Visualisation of Spatial Data with R

April 8, 2013
By
Starting Analysis and Visualisation of Spatial Data with R

Last week I ran an introductory workshop on the analysi

Read more »

Dynamic Wrapping and Recursion with Rcpp

April 8, 2013
By
Dynamic Wrapping and Recursion with Rcpp

We can leverage small parts of the R’s C API in order to infer the type of objects directly at the run-time of a function call, and use this information to dynamically wrap objects as needed. We’ll also present an example of recursing through a list. To get a basic familiarity with the main functions exported from R API, I...

Read more »