Blog Archives

FasteR! HigheR! StrongeR! – A Guide to Speeding Up R Code for Busy People

April 25, 2013
By
FasteR! HigheR! StrongeR! – A Guide to Speeding Up R Code for Busy People

This is an overview of tools for speeding up your R code that I wrote for the Davis R Users’ Group. First, Ask “Why?” It’s customary to quote Donald Knuth at this point, but instead I’ll quote my twitter buddy Ted Hart to illustrate a point: I’m just going to say it.I like for loops in #Rstats,...

Read more »

Debugging Tools in R with Michael Hannon

April 18, 2013
By
Debugging Tools in R with Michael Hannon

Today at Davis R Users’ Group, Michael Hannon gave a great talk on how to use R’s native debugging functions. Here are his notes and code. Introduction This is a discussion of debugging techniques in R. It is based on a paper by Roger Peng, now at Johns Hopkins University (http://www.biostat.jhsph.edu/~rpeng/docs/R-debug-tools.pdf) Focus on five functions: traceback debug browser trace recover Severity level R mainly uses...

Read more »

Demographic analysis using the `popbio` library and some other fun stuff

April 4, 2013
By
Demographic analysis using the `popbio` library and some other fun stuff

This week at the Davis R Users’ Group we had a great presentation by Kara Moore O’Leary on using the popbio package to examine rare plant demographics. The following is her script run through knitr. You can download the original script and associated data here. Find out more about Kara and her work at...

Read more »

Model Selection and Multi-Model Inference

February 20, 2013
By
Model Selection and Multi-Model Inference

At D-RUG this week Rosemary Hartman presented a really useful case study in model selection, based on her work on frog habitat. Here is her code run through ‘knitr’. Original code and data are posted here. (yes, I am just doing this for the flying monkey) Editor’s note: we’re giving away flying monkey dolls from our...

Read more »

Mason Earles on interfacing R with the Forest Vegetation Simulator

February 13, 2013
By

Mason Earles gave a great presentation this week at Davis R Users’ Group about linking R with the Forest Vegetation Simulator (FVS). FVS is a model developed by the US Forest Service to simulate forest growth over time. It’s written in FORTRAN and has been around since the 1970s. FVS has recently gone open-source (its...

Read more »

Ryan Peek on using xts and ggplot for time-series data

February 6, 2013
By
Ryan Peek on using xts and ggplot for time-series data

At Davis R Users’ Group today, Ryan Peek gave a presentation on how he takes data from his field instruments and visualizes it in R. Here are his notes. The original *.Rmd file and data can be found here SHORT HOW-TO ON USING XTS AND GGPLOT FOR TIME SERIES DATA XTS is a very helpful package...

Read more »

Steve Culman on the `plyr` Package

January 17, 2013
By

At Davis R Users’ Group yesteray, Steve Culman gave us an introduction to the plyr package and how to use it to manipulate data. Here’s his presentation, and the accompanying demonstration script: Steve’s talk is based on this paper by Hadley Wickham in the Journal of Statistical Software. A lot of useful related...

Read more »

Don’t R alone! A guide to tools for collaboration with R

January 7, 2013
By
Don’t R alone! A guide to tools for collaboration with R

This a brief guide to using R in collaborative, social ways. R is a powerful open-source programming language for data analysis, statistics, and visualization, but much of its power derives from a large, engaged community of users. This is an introduction to tools for engaging the community to improve your R code and collaborate with others. (Am I...

Read more »

Lauren Yamane on Matrix Population Models in R

November 30, 2012
By
Lauren Yamane on Matrix Population Models in R

Last week in Davis R Users’ Group, Lauren Yamane showed us how she created and analyzed a stochastic age-structured population in R. Her examples are below. Her original scripts can be found as *.Rmd files here A note to UC Davis students: This topic and others will be covered by Marissa Baskett and Sebastian Schreiber in...

Read more »

A quick function for editing CSV files in R

November 19, 2012
By

I’ve been hunting for a lightweight CSV editor for OSX so I could to make fixes to data files and not need to fire up Excel. While you can edit a CSV file in any text editor, it’s a pain to navigate the files without a spreadsheet-like interface. Unfortunately there doesn’t seem to be a good,...

Read more »