Rough R Code and TODO list