Residual Analysis with R