Monthly Archives: May 2012

Converting cross sectional data with dates to weekly averages in R.

May 30, 2012
By
Converting cross sectional data with dates to weekly averages in R.

I was recently confronted with a problem where I had to compare two very different data sets. The problem was that one data set was observed cross sectional data with dates over the course of three months and the other was weekly averages during those same three months.  After a bit of research, I discovered

Read more »

Online Course from Statistics.com: Advanced Programming in R

May 30, 2012
By

  Hadley Wickham teaches “Programming in R – Advanced,” June 15 – July 13 online at Statistics.com. This is the third in a series of courses that cover programming in R, so if you are new to the subject you should start with our Jul 27 course “Introduction to R: Data Handling.” Upcoming Courses: Jun 15:  Advanced Programming in R...

Read more »

Predicting the NBA Finals with R

May 30, 2012
By
Predicting the NBA Finals with R

This is the initial post about the algorithm. See updates 1, 2, and 3 for more. The algorithm is currently 4-2 in the playoffs!OverviewI was struck by Martin O'Leary's recent post on predicting the Eurovision finals, which led me to decide that I wou...

Read more »

Project Euler — problem 5

May 30, 2012
By

I spent around 40 minutes on the last post yesterday, which delayed my bedding time and caused my sleepiness in the morning. So, I’m starting to write earlier tonight. The fifth problem is to calculate the smallest composite for given numbers. 2520 is … Continue reading →

Read more »

R 2.15.1 scheduled for June 22

May 30, 2012
By

The next release of open-source R, codenamed "Roasted Marshmallows", is scheduled to be released on June 22, according to this announcement on the r-announce mailing list. Don't expect too many changes in this update: despite the fact that "there have been very few issues with 2.15.0 ... some people may be waiting superstitiously for a .1 release". This will...

Read more »

Send emails with attachments from R command line

May 30, 2012
By

The sendmailR package makes it easy to send emails with attachments from the R command line.  #load packagelibrary("sendmailR")#use string formatting and your system info to format FROM address from <- sprintf("<Project1@%s>", Sys.info()[...

Read more »

Be assertive!

May 30, 2012
By
Be assertive!

assertive, my new package for writing robust code, is now on CRAN. It consists of lots of is functions for checking variables, and corresponding assert functions that throw an error if the condition doesn’t hold. For example, is_a_number checks that the input is numeric and scalar. In the last two cases, the return value of

Read more »

Predicting the NBA Finals with R

May 30, 2012
By
Predicting the NBA Finals with R

This is the initial post about the algorithm. See updates 1, 2, and 3 for more. The algorithm is currently 4-2 in the playoffs!OverviewI was struck by Martin O'Leary's recent post on predicting the Eurovision finals, which led me to decide that I wou...

Read more »

Space Time Swing Probability Plot for Ichiro

May 30, 2012
By

I was having some fun with PITCHf/x data and generalize additive models. PITCHf/x keeps track of the trajectory, path, location of every pitch in the MLB. It is pretty accurate and opens up baseball to more analyses than ever before. Generalized additi...

Read more »

knitcitations

May 30, 2012
By

Included file 'themes/noamblog/rsscss.html' not found in _includes directory Markdown is becoming an increasingly popular platform for lightweight and online publishing. While traditional publishing tools like LaTeX and word processors have long had i...

Read more »