R Function Binding Vectors and Matrices of Variable Length, bug fixed

August 19, 2011
By

Now this is something very geeky, but useful. I had to bind two matrices or vectors together to become a bigger matrix. However, they need not have the same number of rows or even the same row names. The standard cbind() functions require the vectors or matrices to be compatible. The matching is “stupid”, in

Read more »

useR2011 highlights

August 18, 2011
By
useR2011 highlights

useR has been exhilarating and exhausting. Now it’s finished, I wanted to share my highlights. 10. My inner twelve year old schoolgirl swooning and fainting with excitement every time I chatted with a member of R-core. 9. Patrick Burns declaring that his company consists of himself and his two cats. And that one of the

Read more »

Do older SOers use fewer words?

August 18, 2011
By
Do older SOers use fewer words?

On StackOverflow, to posters with more experience ask their questions in fewer words? No. There's no visible difference: Chars of non-code: Chars of code: The data comes from the super-handy StackOverflow API, which was retrieved using wget and then parsed using rjson and XML. First read in and parse the JSON:so.R1...

Read more »

Halstead’s metrics and flat-Earthers are still with us

August 18, 2011
By
Halstead’s metrics and flat-Earthers are still with us

I recently discovered a fascinating series of technical reports from the 1970s in the Purdue University e-Pubs archive that shine a surprising light on what are now known as the Halstead metrics. The first surprises came from Halstead’s A Software Physics Analysis of Akiyama’s Debugging Data; surprising in the size of the data set used

Read more »

I, Rbot: Tweeting from R

August 18, 2011
By
I, Rbot: Tweeting from R

Over the past few weeks I’ve been running batches of JAGS simulations from R. Although these models typically converged within an hour or so, more complex models can take days, or even weeks to converge. Because we, as humans, are … Continue reading →

Read more »

HPC news from the useR2011 conference

August 18, 2011
By

It was an exciting useR2011 conference at the University of Warwick, Coventry, UK. Thanks a lot to the local organizing and program committee for having this great conference. I enjoyed the variety of talks, the poster session and the conference dinner and everything within walking distance. In view of HPC for R I learned: The

Read more »

Get Used To It

August 18, 2011
By
Get Used To It

This is a brain teaser. You've been warned.The S&P 500 is in a bear market (defined as the 50-day MA being below the 200-day MA) 30.8% of the time. Also, the S&P 500 has experienced single-day 4% declines 0.242% of the time. Of the times we exp...

Read more »

Simon Urbanek – R Graphics: supercharged

August 18, 2011
By
Simon Urbanek – R Graphics: supercharged

New features: rasterImage() (R2.11) bitmap raster drawing; have maps as data backdrops. Polygons with holes: polypath() -(R2.12) At present there is no way to tell when to actually show the plot. For example: plot(x); lines(x). Should we display the plot after plot or after lines Solution dev.hold() and dev.flush() Better performance and useful for animations –

Read more »

Installing RStudio Server on Scientific Linux 6: My bash notebook

August 18, 2011
By
Installing RStudio Server on Scientific Linux 6: My bash notebook

Granted, not a brilliant sysadmin mind at work here, but this might help someone someday.Scientific Linux (SL) is built from Red Hat Enterprise LinuxSee installation instructions here:http://rstudio.org/download/server$ sudo rpm -Uvhhttp://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm password for leipzig: Retrievinghttp://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpmwarning: /var/tmp/rpm-tmp.S2RQAH: Header V3 RSA/SHA256 Signature, key ID0608b895: NOKEYPreparing... ...

Read more »

Kaleidoscope IIIb (useR! 2011)

August 18, 2011
By
Kaleidoscope IIIb (useR! 2011)

O. Mersmann - The microbenchmark package Slides and code (link). SURGEON GENERAL’s WARNING: Microbenchmarks can lead to a distorted view of reality and massive loss of productivity For a higher-order benchmarking package check out the rbenchmark package on R (suggestion from the speaker). Why do we need micro-benchmarking? A simple example showed that it is currently very

Read more »

Big data (useR! 2011)

August 18, 2011
By
Big data (useR! 2011)

Unfortunatley, I missed the first and last talks. My notes from a session on Thursday morning J. Demmler – Challenges of working with a large database of routinely collected health data The SAIL data bank holds over 1.9 billion (anonymous) entries. To use the data for research, they need to ensure that proper data security is

Read more »

We keep breaking records ? so what ?… Get statistical perspective….

August 17, 2011
By
We keep breaking records ? so what ?… Get statistical perspective….

This summer, we have been told that some financial series broke some records (here, in French)For instance, the French CAC40 had negative return for 11 consecutive days (which has never been seen, so far).> library(tseries)> x<-get....

Read more »

The stupidest R code ever

August 17, 2011
By
The stupidest R code ever

Let’s start this blog off right, with the stupidest R mistake I’ve ever made (I think). In the R package that I write, R/qtl, one of the main file formats is a comma-delimited file, where the blank cells in the second row are important, as they distinguish the initial phenotype columns from the genetic marker

Read more »

Real Squeeze

August 17, 2011
By
Real Squeeze

Real yields even out to 10 years have now been competely squeezed. Either bond investors need to accept even worse negative real yields or deflation needs to get ugly for additional price returns from here. If deflation is the outcome, then shorts in s...

Read more »

One R Tip A Day: How to draw a plot with two Y axises and one X axis

August 17, 2011
By
One R Tip A Day: How to draw a plot with two Y axises and one X axis

One R Tip A Day: How to draw a plot with two Y axises and one X axisplot(1:10)par("usr")# 0.64 10.36 0.64 10.36# Now resetting y axis' usr coordinates:par(usr=c(par("usr"), 101, 105))points(1:5, 105:101, col="red")axis(4)par(mar=c(4, 5, 4, 5) ...

Read more »

Lies, Damned Lies, and Politicians

August 17, 2011
By
Lies, Damned Lies, and Politicians

I like politics; I don’t like all of the lying involved.  If you ask me, I think that there should be “Ethics Committee” investigations into all of the lying.  Sure, tweeting a picture of your junk is probably not the … Continue reading →

Read more »

-1% Guaranteed Real Real Return! Yummy??

August 17, 2011
By
-1% Guaranteed Real Real Return! Yummy??

If we’re cooking up a bond return, we have access to 3 ingredients: inflation, credit, and real. Historically, the recipe looks like this (as described in Historical Sources of Bond Returns).0-5 parts inflation + 1-2 parts credit + 1-3 parts realand ...

Read more »

Introduction

August 17, 2011
By
Introduction

I’m at the useR! Conference in Coventry, UK, this week. It’s been every bit as inspiring, interesting and useful as I’d hoped. Particularly interesting were the Lightning talks: a series of 5 minute presentations with one minute in between, with each presentation having 15 slides of 20 sec each, moved forward automatically.  It worked extremely

Read more »

useR2011 Easy interactive ggplots talk

August 17, 2011
By
useR2011 Easy interactive ggplots talk

I’m talking tomorrow at useR! on making ggplots interactive with the gWidgets GUI framework. For those of you at useR, here is the code and data, so you can play along on your laptops. For everyone else, I’ll make the slides available in the next few days so you can see what you missed. Note

Read more »

The R-Files: Martyn Plummer

August 17, 2011
By
The R-Files: Martyn Plummer

"The R-Files" is an occasional series from Revolution Analytics, where we profile prominent members of the R Community. Name: Martyn Plummer Occupation: Statistician at International Agency for Research on Cancer Nationality: British Years Using R: 16 Known for: Member of R core group; member of R Journal editorial board Martyn Plummer is a longtime contributor to the R community...

Read more »

Programming (useR! 2011)

August 17, 2011
By
Programming (useR! 2011)

Ray Brownrigg – Tips and Tricks for young R programmers Problem: Calculate the distribution function of a bivariate Kolomogorov Smirnoff statistic. Essentially three loops. Basic exhaustive search is O(N^3). Fortran gives a single order of magnitude speed-up. Restructuring in R using a single loop is an order faster than fortran. Further improvements make the algorithm

Read more »

Teaser: Running R as a map/reduce job from Riak

August 17, 2011
By
Teaser: Running R as a map/reduce job from Riak

Alliterations aside, here is a preview of something I’ve been tinkering with. My goal is to be able to run …Continue reading »

Read more »

Kaleidoscope IIb (useR! 2011)

August 17, 2011
By
Kaleidoscope IIb (useR! 2011)

L Collingwood – RTextTools RTextTools. A machine learning library for automated text classification. This package builds on previous packages such as tm and random forests. Use case: undergrad labels congressional bills but then quits. Using the previously labelled data, automatically classify the remaining documents. The speaker gave a nice overview of machine learning techniques, but I

Read more »

Lee E. Edlefsen – Scalable Data Analysis in R (useR! 2011)

August 17, 2011
By
Lee E. Edlefsen – Scalable Data Analysis in R (useR! 2011)

The RevoScaleR package isn’t open source, but it is free for academic users. Collect and storing data has outpaced our ability to analyze it. Can R cope with this challenge? The RevoScaleR package is part of the revolution R Enterprise. This package provides data management and data analysis. Uses multiple cores and should scale. Scalability

Read more »

RTextTools v1.2 Available on CRAN + useR! 2011 Kaleidoscope Session

RTextTools v1.2 was released today and we're pleased to announce that the package is finally available on CRAN. Additionally, this update brings minor changes to the API, improvements to the GLMNET algorithm, and more comprehensive documentation. Get started by following our installatio

Read more »

The fun Package: Use R for Fun!

August 16, 2011
By
The fun Package: Use R for Fun!

A couple of days ago we released a package named fun to CRAN, but I did not dare to send an announcement to [email protected] as usual. This package is a collection of some classical computer games (e.g. the Mine sweeper and Five in a row) as well as other funny stuff. Some examples: ## install.packages('fun')

Read more »

Forecasting in R: Starting From Square One

August 16, 2011
By
Forecasting in R: Starting From Square One

Okay in the past few posts I jumped the gun a little bit.  Errors I made include rushing everything, not explaining anything and not giving my blog readers the love and respect they deserve.  What am I talking about? Well before we do anythin...

Read more »

ttrTests Experimentation

August 16, 2011
By
ttrTests Experimentation

I was intrigued by the CRAN update on a package ttrTests, especially since quantstrat is not built for backtesting system parameters and analyzing system performance as I mentioned in A Quantstrat to Build On Part 6.  ttrTests offers a nice start ...

Read more »

R Code Optimization

August 16, 2011
By
R Code Optimization

Handling Large Data with R The following experiments are inspired from this excellent presentation by Ryan Rosario: http://statistics.org.il/wp-content/uploads/2010/04/Big_Memory%20V0.pdf. R presents many I/O functions to the users for reading/writing data such as ‘read.table’ , ‘write.table’ -> http://cran.r-project.org/doc/manuals/R-intro.html#Reading-data-from-files. With data growing larger by the day many new methodologies are available in order to achieve faster I/O operations.

Read more »