Blog Archives

Identifying and characterizing droughts with R

June 11, 2011
By
Identifying and characterizing droughts with R

Recently, I’ve been playing with patterns of drought in paleo records of streamflow. One of the earliest and most helpful tools I’ve developed, identifies and characterizes droughts in extremely long time series using R. I’m still hacking my way through it, but this is what has been cooking thus far… For this example I’ll be

Read more »

New R code for ‘moving’ or ‘running’ correlations

March 4, 2011
By
New R code for ‘moving’ or ‘running’ correlations

Someone at the lab asked how to ‘do something like running means, but with correlations’. I couldn’t find any existing code that would make a good example, so I just wrote some myself. It would be nice to do this without looping. If anyone has a clever way to do this, please do let me

Read more »