R script for factor creation now creates dataframes of factor loadings