Cleaned up the R code a bit. Now need to finish the weighted correlation calculation
random changes