Initial PCA function including convert matrix and plot