added R scripts

* my scratch file (see issue #4)
* model.functions.R