Blog Archives

Writing reproducibly in the open with knitr

April 7, 2012
By
Writing reproducibly in the open with knitr

Sweave is something of a gold standard in reproducible research. It creates a dynamic document, written in a mix of LaTeX and R code where the results of the analysis (numbers, figures, tables) are automatically generated from the code and inserted into the resulting pdf document, making them easy to update if the data or

Read more »

Citations in markdown using knitr

March 24, 2012
By
Citations in markdown using knitr

I am finding myself more and more drawn to markdown rather then tex/Rnw as my standard format (not least of which is the ease of displaying the files on github, particularly now that we have automatic image uploading). One thing I miss from latex is the citation commands. (I understand these can be provided to

Read more »

knitr, github, and a new phase for the lab notebook

March 21, 2012
By
knitr, github, and a new phase for the lab notebook

I have recently modified the basic workflow of my lab notebook since discovering knitr. Before, I would write code files which I could track on github, push figures created by the code to flickr, and then write a notebook entry on wordpress describing what I was doing. I’d embed each figure I wanted into the

Read more »

Citing R packages

March 20, 2012
By
Citing R packages

I’m not always careful in citing all the R packages I use. R actually has some rather nice built-in mechanisms to support this, so I really have no excuse. Here’s some quick examples: To cite the ouch package in publications use: Aaron A. King and Marguerite A. Butler (2009), ouch: Ornstein-Uhlenbeck models for phylogenetic comparative

Read more »

Elegant & fast data manipulation with data.table

February 12, 2012
By
Elegant & fast data manipulation with data.table

Just learned about the R data.table package (ht @recology_) makes R data frames into ultra-fast, SQL-like objects. One thing we get is some very nice and powerful syntax. Consider some simple data of replicate time series: To apply a function to each set of replicates, instead of We can use: Note that we could have

Read more »

Is your phylogeny informative?

January 19, 2012
By
Is your phylogeny informative?

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

Read more »

treebase package on cran

October 25, 2011
By
treebase package on cran

My treebase package is now up on the CRAN repository. (Source code is up, the binaries should appear soon). Here’s a few introductory examples to illustrate some of the functionality of the package. Thanks in part to new data deposition requirements at journals such as Evolution, Am Nat, and Sys Bio, and data management plan

Read more »

Showcasing the latest phylogenetic methods: AUTEUR

July 20, 2011
By
Showcasing the latest phylogenetic methods: AUTEUR

While high-speed fish feeding videos may be the signature of the lab, dig a bit deeper and you’ll find a wealth of comparative phylogenetic methods sneaking in.  It’s a natural union — expert functional morphology is the key to good comparative methods, just as phylogenies hold the key to untangling the evolutionary origins of that

Read more »

TreeBASE in R: a first tutorial

May 16, 2011
By
TreeBASE in R: a first tutorial

My TreeBASE R package is essentially functional now.  Here’s a quick tutorial on the kinds of things it can do.  Grab the treebase package here, install and load the library into R. TreeBASE provides two APIs to query the database, one which searches by the metadata associated with different publications (called OAI-PMH), and another which

Read more »

socialR: Reproducible Research & Notebook integration with R

December 10, 2010
By
socialR: Reproducible Research & Notebook integration with R

I’ve created an R package that uses social media tools for reproducible research.  The goal of the package is this: whenever I run a code, output figures are automatically added to my figure repository (Flickr), linked to the timestamped version of the code that produced them in the code repository.  Figures should be tagged by

Read more »