Musings, Explorations, and Announcements

 
 

20 November 2013

The following is the code from a presentation made by Rosemary Hartman to the Davis R Users’ Group. I’ve run the code through the spin function in knitr to produce this post. Download the script to walk through here. First, make your plot. I am going to use the data already in R about sleep habits of different animals. It’s the same one Noam used for his intro to ggplot.

Read More…

 
 
 

7 November 2013

For the past week I’ve been at the Mathematical Biosciences Institute at Ohio State, attending the Workshop on Sustainable Management of Living Natural Resources. It’s been an absolutely top-notch meeting. I need to get myself to more of these small workshops.

I brought a poster describing some of my work in progress on managing Sudden Oak Death. Here it is, and it’s archived over at Figshare.

 
 
 

21 June 2013

My first crack at an age-structured disease model with multiple infections yielded the interesting result that one could observe differences in disease rates across age without any actual differences in the biology between old and young individuals. Today I’m trying to answer a different question analytically: does age structure matter for the course of the disease in the whole population? Here’s the model. There are two minor changes: I no longer scale \(J\) and \(A\) with \(K\) in the third and fourth equations; there’s no reason the encounter rate should be tied to carrying capacity.

Read More…

 
 
 

18 June 2013

Yesterday, I was creating a knitr document based on a script, and was looking for a way to include content from an R help file. The script, which was a teaching document, had a help() command for when the author wanted to refer readers to R documentation. I wanted that text in my final document, though. There’s no standard way to do this in R, but with some help from Stack Overflow and Scott Chamberlain, I figured out I needed some functions hidden in the depths of the tools package.

Read More…

 
 
 

17 June 2013

At our last Davis R Users’ Group meeting of the quarter, Dave Harris gave a talk on how to use the bbmle package to fit mechanistic models to ecological data. Here’s his script, which I ran throgh the spin function in knitr: # Load data library(emdbook) ## Loading required package: MASS Loading required package: lattice library(bbmle) ## Loading required package: stats4 data(ReedfrogFuncresp) plot(ReedfrogFuncresp, xlim = c(0, 100), xaxs = "i") Statistical models are stories about how the data came to be.

Read More…