Like Rails casts, but for the R framework