Not-so-simple linear regression with R