As promised, here is an updated version of my script that I used to run the shape analysis and this is the link to the original publication where I got most of my script http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0121102 . There appears to be some supporting documentation on that site, but you can also get help on specific functions within R. I was unable to upload the script as a .R file, but you should be able to open the .txt file within R too.