Added FPCAtest.r in R for convenience. Still needs some re-writing and documentation of these functions.