Added r script for compiling data