# Monthly Archives: January 2012

## Time Series Matching with Dynamic Time Warping

January 20, 2012
By

THIS IS NOT INVESTMENT ADVICE. The information is provided for informational purposes only. In the Time Series Matching post, I used one to one mapping to the compute distance between the query(current pattern) and reference(historical time series). Following chart visualizes this concept. The distance is the sum of vertical lines. An alternative way to map

## MAT8886 Extremes and sums (of i.i.d. random variables)

January 20, 2012
By

Yesterday, we have discussed briefly sums and maximas of i.i.d. random variables using the concept of subexponential distributions. Today, we will introduce the concept of regular variation: a positive function is said to be regularly varying (at i...

## Object Oriented Programming in R

January 20, 2012
By

As someone who was a Java programmer for many years learning R’s object oriented programming framework has been frustrating to say the least. I like the simplicity of S3 but find it limiting when you wish to write methods that change the underlying data elements. That is, printing, summarizing, and plotting work great because they

## Hadley Wickham goes behind the scenes on ggplot2

January 20, 2012
By

Hadley Wickham, creator of the ggplot2 packages for R (as well as several others) will present a webinar on February 8 going behind the scenes of the popular graphics package. If you've never used ggplot2 before, this will be a great way to learn about the kinds of charts you can create with it; and if you're a regular...

## Power and Sample Size for Repeated Measures ANOVA with R

January 20, 2012
By

Background One of my colleagues is an academic physical therapist (PT), and he's working on a paper to his colleagues related to power, sample size, and navigating the thicket of trouble that surrounds those two things. We recently got together to walk through some of the issues, and I thought I would share some of the wildlife we observed...

## Project Euler in R: Problem 24

January 19, 2012
By

I had previously posted solutions in R to Project Euler problem 23 and problem 22.  This is the next problem from Project Euler. The statement of problem 24 is as follows.A permutation is an ordered arrangement of objects....

## Connect to the Facebook API with R for Windows Users

January 19, 2012
By

Recently there have been some great posts that highlight how easy it is to hook into the Facebook Graph API using R. Crawling Facebook with R started the discussion and Apply R highlighted how easy it was to plot our network. In order to replicate the examples on Windows, most likely you will need to

## Knitr is Awesome!

January 19, 2012
By

I love TikZ in LaTeX and I use it exclusively when writing figures for my papers. I also use the tikzDevice package to convert all figures I create in R to TikZ code, so the font used in the text and figures is the same (and having your R figures in Ti...

## Scoping functions in R

January 19, 2012
By

I want to test embedding source code in the blog by using the handy Gist tool provided by GitHub. These two R functions are a good opportunity to test out embedding a Gist on the website. These functions allow for threshold testing within a vector in R...

January 19, 2012
By

Yesterday my paper   appeared in early view in Evolution (author’s preprint),1 so I’d like to take this chance to share the back-story and highlight my own view on some of our findings, and the associated package on CRAN.2 I didn’t set out to write this paper.  I set out to write a very different