Publications by Matt Shotwell
Extension to an R Package: brew gets a weave
I’ve had enough of copy and pasting output from my R session into my email editor, blog, etc. I need something like Sweave for plain text files. In particular, I want the result of parsing <<echo=TRUE>>= f <- function(x) { x + 1 } f(1) @ with Sweave, but without the latex markup. For example, the Sweave output of this code chunk looks like...
3045 sym R (2060 sym/7 pcs)
R Environments for Gibbs Sampler State
I recently decided to revisit some R code that implements a Gibbs sampler in an attempt to decrease the iteration time. My strategy was to implement the sampler state as an R environment rather than a list. The rationale was that passing an environment to and from functions would reduce the amount of duplication (memory copying). In my experiment...
2141 sym R (2421 sym/6 pcs) 14 img
Ed Burnette on Software Patents
Ed Burnette makes a point that hits home, with regard to software patents, and how engineers and programmers of modern companies are now being asked to write them: Unfortunately, the joke is on all of us. It’s on our economy, as we let patents choke down innovation and increase fear, uncertainty, and doubt in an already uncertain time. It’s...
1103 sym
Tools for Hacking R: Subversion
The development version of R is stored in a Subversion repository at the URL http://svn.r-project.org/R/trunk/. In fact, you can browse the source code by clicking the link. Subversion Hierarchy Subversion is software for source code revision control. That means it keeps track of changes, who made them, when they were made, and any comments about...
3358 sym R (683 sym/6 pcs)
Tools for Hacking R: Git + Subversion
In an earlier post, I discussed how to use Subversion to download, edit, and generate a patch against R‘s source code. Since most of us can’t commit our code changes back to R‘s repository, we can consider alternatives to store and maintain our patch, until it is eventually incorporated into R. Of course, our changes may never be incorporat...
3883 sym R (2146 sym/7 pcs)
Eigenimages: The AT&T Cambridge Faces Database
I picked up the AT&T Laboratories Cambridge database of faces for a clustering application. The database consists of images of 40 distinct subjects, each in 10 different facial positions and expressions. Typically, the goal of clustering in these data is to recover the ‘true’ partition, or that which isolates images of distinct subjects. Each...
2275 sym R (70 sym/1 pcs) 2 img
ECG Project
In an earlier post, I described some ECG signal processing. In fact, these recordings were from my own heart, and I had collected them using a homemade ECG. The following is a repost from my old site describing the device. I assembled an instrumentation amplifier to measure cardiac potentials (i.e. an electrocardiograph (ECG)). The analog-to-digi...
2743 sym 2 img
A Not Quite Random Number Generator (NQRNG)
I connected the instrumentation amplifier described in an earlier post to a piezoelectric transducer (buzzer) and made recordings at 5000 gain. The plot below shows 1000 such measurements over 1.0 seconds. There is a 4.0 second (at 1000Hz) sample of the data here piezo.csv. There is a clear sinusoidal signal in these data of about 60Hz. These fin...
2942 sym 56 img
Bayesian Diabetes Projections by CDC
Bayesian methods are supporting decisions and news at the national level! The Centers for Disease Control and Prevention summarizes a report published in the journal Population Health Metrics. The news also made it to the national media. The report (JP Boyle, TJ Thompson, EW Gregg, LE Barker, and DF Williamson (2010) “Projection of the year 205...
1704 sym 16 img
The Automatic Millionaire & Amortization
Dan Byrne of Vanderbilt University gave me a book back in October titled The Automatic Millionaire by David Bach. The book is an easy read and full of sound advice that I intend to take. Bach espouses a plan for retirement built on the principles of “paying yourself first” (i.e. before taxation, 401(k), 403(b)), making your plan automatic (i....
2794 sym R (419 sym/3 pcs) 4 img