Using Emacs as a front-end for R

August 15, 2011
By

Back when I was a grad student, I was a devoted Emacs user. I basically used it like an operating system: it wasn't just my text editor, but also my mail reader, my Web browser, my news reader, and so much more. (I once even asked our sysadmin to change my default shell to /usr/bin/emacs. He refused.) So when...

Read more »

Live from useR!

August 15, 2011
By

The Revolution Analytics team is at the R user conference useR! at Warwick University this week. We'll bring you the updates from the conference with the latest from the R community as we go, but as we're on UK time blogging will be at unusual hours for the next few days. Things are off to a great start, with...

Read more »

Making Stuff is Scary

August 15, 2011
By
Making Stuff is Scary

My daughter's best friend lives just down the street. Her mother runs a cupcake shop that's just a little further down the street. Being eleven going on sixteen, my daughter fancies herself a "quote" -- worker at the shop. She's not paid in actual mone...

Read more »

Unrequited lm Love

August 14, 2011
By
Unrequited lm Love

In System Failure-Maybe it Will Help I presented the initial trials of a linear model system for stocks, and even though they were not a resounding success, I have been strangely determined to discover a working version of this framework.  Maybe t...

Read more »

Breaking it up into trend and seasonal and error components

August 14, 2011
By
Breaking it up into trend and seasonal and error components

 GDP=scan("/Users/stevensabol/Desktop/R/gdp.csv")Read 258 items> GDP=ts(GDP,start=1,frequency=4)> dlGDP=diff(log(GDP))> plot(stl(log(GDP),"per"))This allows us to do a structural decompositionlog(GDP) = trend + season + error Here is...

Read more »

Get those plots

August 14, 2011
By
Get those plots

Type in the following to get a Q-Q plot and a histogram on top of each otherpar(mfrow=c(2,1))> hist(dlGDP,prob=T,12)> lines(density(dlGDP))> qqnorm(dlGDP)> qqline(dlGDP)the top graph says that the errors are pretty nicely distributed around...

Read more »

Playing In R: Getting Down to Business

August 14, 2011
By
Playing In R: Getting Down to Business

okay so now we are up and plotting. Let's dive into some analysis.First we want to see if we can use the series so we have to see if its covariance stationary and that means that its mean is constant and also we can't be able to predict the e...

Read more »

Playing Around With R

August 14, 2011
By
Playing Around With R

okay so today we will start playing around with R and will use GDP as our ginny pig.okay so first do the following:1. DOWNLOAD R2. Create a folder and call it "R" on your desktop.  Then type ingetwd()this will produce the current place where R fin...

Read more »

The Dancing Economist’s content will be statistically enhanced.

August 13, 2011
By
The Dancing Economist’s content will be statistically enhanced.

Recently, I have been fed up. Why? because I wanted to produce professional forecasts on my blog but don't have SAS. I wanted to forecast with some AR, ARMA and ARIMA models, but couldn't. Completely heartbroken. I got to thinking-  R co...

Read more »

the batman equation

August 13, 2011
By
the batman equation

HardOCP has an image with an equation which apparently draws the Batman logo. Read More: 1295 Words Totally

Read more »

GDAT 2011 in Review

August 13, 2011
By
GDAT 2011 in Review

As usual, the Guerrilla Data Analysis Techniques (GDAT) class was a total blast. Motivated students always guarantee that. It would really help our scheduling, however, if people didn't wait until the last nanosecond to register for the class. But give...

Read more »

QTL Analysis in R

August 13, 2011
By
QTL Analysis in R

See also: Part 1: QTL Analysis and Quantitative Genetics  Part 2: Statistical Methods for QTL Analysis The 'qtl' package in R allows you to implement QTL analysis using the methods I've previously discussed. The code below is adapted from Broman...

Read more »

R Program Documentation Template

August 13, 2011
By
R Program Documentation Template

# ------------------------------------------------------------------ # |PROGRAM NAME: # |DATE: # |CREATED BY: MATT BOGARD # |PROJECT FILE: # |---------------------------------------------------------------- # | PURPOSE: ...

Read more »

Stop! (In the name of a sensible interface)

August 12, 2011
By
Stop! (In the name of a sensible interface)

In my last post I talked about using the number of lines in a function as a guide to whether you need to break it down into smaller pieces. There are many other useful metrics for the complexity of a function, most notably cyclomatic complexity, which tracks the number of different routes that code can

Read more »

Create an animated clock in R with ggplot2 (and ffmpeg)

August 12, 2011
By

Because it’s Friday—and I needed to create this for a separate visualization—here is how to create an animated clock in R using ggplot2. In just about 20 lines of code! And here is the clock… I think this is a nifty way to show time elapse, rather than the windowed timelines I had used previously.

Read more »

Revolution Newsletter: August 2011

August 12, 2011
By

The most recent edition of the Revolution Newsletter is out. The news section is below, and you read the full August edition (with highlights from this blog and community events) online. You can subscribe to the Revolution Newsletter to get it monthly via email. Free 30-minute introduction to Revolution R Enterprise. On Wednesday August 24, author and blogger David...

Read more »

Getters and setters in R

August 12, 2011
By

Tweet When I first started using R, one of the things that attracted me was its claim to be an object-oriented programming (OOP) language. Coming from a Java background, I was used to designing software with OOP concepts like encapsulation and inheritance but, when I turned my hand to R, I quickly...

Read more »

CrossValidated blog is on R-bloggers.com from now on

August 12, 2011
By

Some may have already noticed that the last post appeared on the R-bloggers.com, but here now is the official announcement. R-bloggers.com aggregates blogs which write about R. Since questions about R constitute roughly 20% of all the questions on CrossValidated, it is natural that the community blog of CrossValidated writes about R too. We have

Read more »

Monster functions (Raaargh!)

August 12, 2011
By
Monster functions (Raaargh!)

It’s widely considered good programming practice to have lots of little functions rather than a few big functions. The reasons behind this are simple. When your program breaks, it’s much nicer to debug a five line function than a five hundred line function. Additionally, by breaking up your code into little chunks, you often find

Read more »

Musings on Correlation (or yet another reason I fear for those non-methodologically inclined students in my cohort)

August 12, 2011
By
Musings on Correlation (or yet another reason I fear for those non-methodologically inclined students in my cohort)

I’ve been thinking a lot about what it means for two variables to be correlated.  Scientists throw around the term like it’s uniformly understood, but I fear that an understanding of the concept is elusive to substantive researchers who aren’t interested in empirical methods, except as a means by which we can demonstrate that our

Read more »

JAGS 3.1.0

August 11, 2011
By
JAGS 3.1.0

The patch release, 3.1.0  fixes a problem due to a change in the way the adapt command works (and the adapt() function in rjags).  If the model has an adaptive phase, you should normally include a burn in period (with … Continue reading →

Read more »

System Failure-Maybe it Will Help

August 11, 2011
By
System Failure-Maybe it Will Help

I hope everyone is enjoying the market.  After a crazy week personally and 6% intraday swings, I remember why I abandoned day trading. I often wonder if I should share ideas that do not work as well as I would like.  In this case, I know I ha...

Read more »

Setup up the inverse of additive relationship matrix in R

August 11, 2011
By
Setup up the inverse of additive relationship matrix in R

Additive genetic covariance between individuals is one of the key concepts in (quantitative) genetics. When doing the prediction of additive genetic values for pedigree members, we need the inverse of the so called numerator relationship matr...

Read more »

FastCompany on telling stories with data

August 11, 2011
By

An article in FastCompany today profiles two websites that excel in telling engaging stories with data: the FlowingData and OkTrends blogs. Both sites often use R for data analysis and data visualization, and have been featured here on this blog. FlowingData regularly posts guides on how to use R to recreate many of its featured visualizations with bubble charts,...

Read more »

OpenAnalytics at UseR!2011

August 11, 2011
By

Thursday 11 August 2011 - 22:36 OpenAnalytics is happy to sponsor UseR!2011 and will present recent work that has been released under open source license in three presentations: R and GPU Computing, which accompanies the first public release of...

Read more »

High-Performance in Cloud Computing

August 11, 2011
By
High-Performance in Cloud Computing

Very often scientists are worried about performance and security in cloud computing. Especially, when talking about High-Performance Computing (HPC) in the cloud it is a very important aspect to proof efficient calculation speed in the cloud. Cloud computing describes a new delivery model for IT services based on Internet protocols, and it typically involves provisioning

Read more »

Using OpenMP-ized C code with R

August 11, 2011
By

What is OpenMP? Basically a standard compiler extension allowing one to easily distribute calculations over multiple processors in a shared-memory manner (this is especially important when dealing with large data — simple separate-process approach usually requires as many copies of the working data as there are threads, and this may easily be an overkill even

Read more »

Test Difference between Two Proportions & Plot Confidence Intervals

August 11, 2011
By
Test Difference between Two Proportions & Plot Confidence Intervals

..an illustrative example for testing proportions and presenting the results.the data: number of indigenous and alien plant species with and without vegetative reproduction. Hypothesis: The proportion of species with vegetative reproduction is differen...

Read more »

ggplot2: Determining the order in which lines are drawn

August 11, 2011
By
ggplot2: Determining the order in which lines are drawn

In a time series, I want to plot the values of an interesting cluster versus the background. However, if I'm not careful, ggplot will draw the items in an order determined by their name, so background items will obscure the interesting cluster: Corr...

Read more »