R studio model code

This appears to be approximately the same as a post you made here earlier:

Please see our FAQ about cross-posting/re-posting: