Move a part of data munging code from midas user guide to appendix.R.
No external data left now.
Make R output to adher to JSS style
Start tidying the code
Further style improvements
Further style corrections