Recreate the GAM partial regression smooth plots from R package mgcv (with a little style)

We use the R library mgcv for modeling environmental data with generalized additive models (GAMs). It's a great library loaded with functionality but we often find that the default diagnostic plots are uninspiring. The partial residual plots, in particular, are functional but not pretty and the residuals are almost invisible. This post would be much […]

Continue reading →

Tired of using Helvetica in your R graphics? Here’s how to use the fonts you like

Although R has vast graphical functionality I've lamented the lack of support for additional fonts. You can spend an incredible amount of time fine-tuning a ggplot2 graphic, fiddling with the length of the tick marks, getting the legend just right but then the Helvetica text detracts from the beauty of what you've created. My understanding […]

Continue reading →