sixty two-minute r twotorials now available

April 12, 2012
By

sixty twotorials now posted. two minutes each.new video highlights:024 how to run counts, tables, crosstabs, and flat tables on a data frame in r 030 what is a function anyway and how does it input and output stuff in r 022 how to generate b...

Read more »

Ggplot2 notes part 2

April 12, 2012
By

Here is part 2 of my guide to using ggplot2. Scales Following on directly from the previous notes you can manually adjust the colours and shapes used in the chart if you don’t like the defaults, as shown in figure 1. … Continue reading &#8...

Read more »

Fun Editing R Graphs in Inkscape

April 12, 2012
By
Fun Editing R Graphs in Inkscape

Last week, I read a chapter out of Visualize This by Nathan Yau.  I was, of course, delighted to see that he was championing the use of R.  One really cool thing that I learned from his book, and was very … Continue reading →

Read more »

M-O-M vs Y-O-Y inflation rates in India

April 12, 2012
By
M-O-M vs Y-O-Y inflation rates in India

Some time back I came across this article, by one of our alumni who is currently at NIPFP, which presents some caveats and shortcomings of different measure of inflation in India in a concise manner. Since my master's thesis topic revolves around infla...

Read more »

Statistical Software Popularity on Google Scholar

April 12, 2012
By
Statistical Software Popularity on Google Scholar

Background (probably boring) Several months ago, my boss and I were discussing how he got the data for his software popularity article; the rest of the background discussion pertains to those plots, so I would recommend going over to take a look before continuing on (or just skip to the next section if you're impatient).  Specifically, we were talking...

Read more »

Weighted t-Test in R

April 12, 2012
By

Although there is a weighted.mean function in R, so far I couldn’t find a implementation of weighted.var and weighted.t.test – here they are (the weighted variance is from Gavin Simpson, found on the R malining list): ?View Code RSPLUS# weighted … Continue reading →

Read more »

R, Julia and the shiny new thing

April 12, 2012
By
R, Julia and the shiny new thing

My head exploded a while ago. Perhaps not my head but my brain was all mushy after working every day of March and first week of April; an explanation—as good as any—for the post hiatus. Back to the post title. … Continue reading →

Read more »

How to work with Google n-gram data sets in R using MySQL

April 12, 2012
By
How to work with Google n-gram data sets in R using MySQL

In this R tutorial you will learn how to work with Google n-gram data sets with the help of MySQL. The complete R code is included in this post.

Read more »

Nick Stokes Distance code, now with Big Memory

April 12, 2012
By
Nick Stokes Distance code, now with Big Memory

In my last post I was struggling with getting a big memory version of the distance matrix to work fast. Nick and other readers had some suggestions and after puttering around with Nicks code I’ve adapted it to big memory and not impacted the run time very much. For comparison writing a 10K by 10K

Read more »

Video: Quantitative Neuroimaging with R

April 11, 2012
By
Video: Quantitative Neuroimaging with R

The following video was recorded at Melbourne R Users. A summary of the talk is as follows: Recent advances in medical imaging allow us to routinely acquire highly detailed images of the living human brain. These images can be used … Continue reading →

Read more »

Generate artificial DNA or protein sequences in R in a single line of code.

April 11, 2012
By
Generate artificial DNA or protein sequences in R in a single line of code.

To generate an artificial DNA sequence of  "n" bases long with a fixed composition bias in just one line of code, just open your R prompt and type:seqX <- sample(c("A","C","G","T"),10000,rep=TRUE,prob=c(0.4,0.1,0.1,0.4))As you see, the alphabet...

Read more »

Epic R is Epic <- Beginners command reference card

April 11, 2012
By
Epic R is Epic <-  Beginners command reference card

This reference card has been written by Tom Short.Click the image to see the R magic:Thank you for your support Tom.Benjamin

Read more »

Quick Hit: which() and match() are not the same

April 11, 2012
By

What’s the difference between using which() and match() in R? For me - about 10 hours! Today I was doing some string matching in R. In my experience performing any sort of regex or string manipulation in R is a mistake....

Read more »

Big Data, R and HANA: Analyze 200 Million Data Points and Later Visualize Using Google Maps

April 11, 2012
By
Big Data, R and HANA: Analyze 200 Million Data Points and Later Visualize Using Google Maps

Technologies: SAP HANA, R, HTML5, D3, Google Maps, JQuery and JSONFor this fun exercise, I analyzed more than 200 million data points using SAP HANA and R and then brought in the aggregated results in HTML5 using D3, JSON and Google Maps APIs.  Th...

Read more »

Latex Allergy Cured by knitr

April 11, 2012
By
Latex Allergy Cured by knitr

I have always known that at some point I would have to succumb to the power of Latex, but Latex has been uncharacteristically intimidating to me.  I finally found the remedy to my Latex allergy with the amazing and fantastic knitr package from Yih...

Read more »

Stop squinting at word clouds in the hope of getting insights

April 11, 2012
By
Stop squinting at word clouds in the hope of getting insights

Someone recently asked on twitter about about peoples' preferences for cloud generators in R. I replied that I thought the "null" word cloud generator was best. By this I mean that I think the word cloud is a bad visualization method. Why? Here is one article with a good perspective, but you can search for

Read more »

Flying: Boredom and Terror

April 11, 2012
By
Flying: Boredom and Terror

Data represents all planes (not just commercial planes) for the United States "There are only two emotions on a plane: boredom and terror." -- Orson Welles, interview to celebrate his 70th birthday, The Times of London, 6 May 1985. ...

Read more »

The age of sail, visualized

April 11, 2012
By

As anyone who's ever played Civilization knows, the advent of sailboats capable of crossing the oceans leads to an explosion of exploration, commerce and social development. And with the visualization below, you can see that explosion in action: Ben Schmidt used the R language and data recorded in by hand in ship logs to create the animation above. Like...

Read more »

PostgreSQL Scalability Analysis Deconstructed

April 11, 2012
By
PostgreSQL Scalability Analysis Deconstructed

In 2010, I presented my universal scalability law (USL) at the SURGE conference. I came away with the impression that nobody really understood what I was talking about (quantifying scalability) or, maybe DevOps types thought it was all too hard (math). Since then, however, I've come to find out that people like Baron Schwartz did get it...

Read more »

The Euler Method In R

April 11, 2012
By

The Euler Method is a very simple method used for numerical solution of initial-value problems. Although there are much better methods in practise, it is a nice intuitive mechanism. The objective is to find a solution to the equation $$ … Continue reading →

Read more »

Customising vegan’s ordination plots

April 11, 2012
By
Customising vegan’s ordination plots

As a developer on the vegan package for R, one of the most FAQs is how to customise ordination diagrams, usually to colour the sample points according to an external grouping variable. Now, just because we get asked how to … Continue reading →

Read more »

RcppArmadillo 0.3.0 is now on CRAN

April 11, 2012
By

Conrad Sanderson has released a new major version 3.0.0 of his excellent Armadillo C++ template library for linear algebra. A corresponding new release 0.3.0 of RcppArmadillo is now on CRAN. This follows four pre-releases of Armadillo which we pack...

Read more »

Customising vegan’s ordination plots

April 11, 2012
By
Customising vegan’s ordination plots

As a developer on the vegan package for R, one of the most FAQs is how to customise ordination diagrams, usually to colour the sample points according to an external grouping variable. Now, just because we get asked how to do this a lot is not really a reflection on the quality of the plot() methods...

Read more »

Getting Started with JAGS, rjags, and Bayesian Modelling

April 10, 2012
By

This post provides links to various resources on getting started with Bayesian modelling using JAGS and R. It discusses: (1) what is JAGS; (2) why you might want to perform Bayesian modelling using JAGS; (3) how to install JAGS; (4) where to find furth...

Read more »

Speed up your R code using a just-in-time (JIT) compiler

April 10, 2012
By

This post is about speeding up your R code using the JIT (just in time) compilation capabilities offered by the new (well, now a year old) {compiler} package. Specifically, dealing with the practical difference between enableJIT and the cmpfun functions. …Read more »

Read more »

Using SNA in Predictive Modeling

April 10, 2012
By
Using SNA in Predictive Modeling

In a previous post, I described the basics of social network analysis. I plan to extend that example here with an application in predictive analytics. Let's suppose we have the following network (visualized in R)Suppose we have used the igraph package ...

Read more »

R at the Consumer Financial Protection Bureau

April 10, 2012
By

The O'Reilly Radar blog has a lengthy and very interesting interview with the lead and deputy CIOs of the Consumer Financial Protection Bureau, the new US government agency devoted to consumer protections in the financial markets. In that interview, they talk about the many open-source tools used in the agency (and the parent Treasury Department): Linux, WordPress, Splunk, Django,...

Read more »

Working with strings

April 10, 2012
By

R has a lot of string functions, many of them can be found with ls("package:base", pattern="str"). Additionally, there are add-on packages such as stringr, gsubfn and brew that enhance R string processing capabilities. As a statistical language and environment, R has an edge compared to other programming languages when it comes to text mining algorithms or natural language processing....

Read more »

How to plot lattice and ggplot2 graphs with FastRWeb

April 10, 2012
By
How to plot lattice and ggplot2 graphs with FastRWeb

With print() If you are an advanced R user, you probably know the lattice and the ggplot2 packages. They allow you to plot elegant graphics with less code (Hocking, 2009 and Sueur, 2010). If you know these two packages, you should hardly use plot() for your graphs. If you read my article on FastRWeb, you

Read more »