Part working solution to rankall.R added. About to change lapply to a for loop.