Adding old R scripts. Out of date but may be useful in future.