Tidied code following the Google R style guide
Fixed problems in the PCsumvar and PCprodvar code - old version calculated sum and product of variance for single PC axes, new version assigns 0 values to the sum and product calculated for single axes. NB this fix means I need to re-do the disparity analyses