Update LogitWithR.r

Changed the "check version" function to work for versions 3 up to 3.14. (Current version 3.0.3)
Uses "resid" to record residuals.
Uses "foreign" package to recognize write.dbf function.