Blog Archives

R Function of the Day: sample

May 23, 2010
By
R Function of the Day: sample

The R Function of the Day series will focus on describing in plain language how certain R functions work, focusing on simple examples that you can apply to gain insight into your own data. Today, I will discuss the sample function. Random Permutations In its simplest form, the sample function can be used to return

Read more »

Making Emacs Buffer Names Unique Using the Uniquify Package

October 5, 2009
By
Making Emacs Buffer Names Unique Using the Uniquify Package

If you ever work in Emacs with different files that all have the same name, this tip may be very useful for you. In my experience, this most often happens when working with Makefiles from multiple projects or directories. Assuming you have a buffer visiting a file called Makefile, by default Emacs will call the

Read more »

Using R to Analyze Baseball Games in “Real Time”

October 4, 2009
By
Using R to Analyze Baseball Games in “Real Time”

In order to honor the last day of the 2009 MLB regular season (excepting the Twins/Tigers tiebreaker Tuesday night), I was reading a book that combines a few of my favorite thing: statistics, R, and baseball. The book, by Joseph Adler, is called Baseball Hacks, and I highly recommend it if you are interested in

Read more »

Using doc-view with auto-revert to view LaTeX PDF output in Emacs

October 3, 2009
By
Using doc-view with auto-revert to view LaTeX PDF output in Emacs

When I am authoring a document in Emacs, such as a report or my CV, it is useful for me to compile the source file periodically to see what the resulting file PDF looks like. I used to run a separate PDF viewer to look at the output, but I now have a complete Emacs

Read more »

R Object Tooltips in ESS

October 1, 2009
By
R Object Tooltips in ESS

Whether at work or for personal projects, I use ESS a lot to perform interactive data analyses. The ability to write, edit, and submit R commands to an interactive R process is simply something I cannot imagine analyzing data without. An example One thing that I end up having to do a lot is inspect

Read more »

Emacs Key Binding for eval-defun in lisp-mode

September 22, 2009
By
Emacs Key Binding for eval-defun in lisp-mode

When I use R in Emacs through the ESS package, C-c C-c in a .R buffer will send a “block” of code to the inferior R process for evaluation. This was added just a few years ago, but my fingers are now trained to use that key combination for evaluating any block of code. Since

Read more »

R Function of the Day: table

September 21, 2009
By
R Function of the Day: table

The R Function of the Day series will focus on describing in plain language how certain R functions work, focusing on simple examples that you can apply to gain insight into your own data. Today, I will discuss the table function. What situation is table useful in? The table function is a very basic, but

Read more »

R Function of the Day: tapply

September 20, 2009
By
R Function of the Day: tapply

The R Function of the Day series will focus on describing in plain language how certain R functions work, focusing on simple examples that you can apply to gain insight into your own data. Today, I will discuss the tapply function. What situation is tapply useful in? In statistics, one of the most basic activities

Read more »

Welcome to Blogistic Reflections! (A blog created entirely in Emacs org-mode)

September 19, 2009
By
Welcome to Blogistic Reflections! (A blog created entirely in Emacs org-mode)

John Tukey’s preface to Exploratory Data Analysis begins with a useful rule, “It is important to understand what you can do before you learn to measure how well you seem to have done it.” When I decided I wanted to start a blog concentrating on statistics, R, and Emacs, I thought I had better learn

Read more »