Francisco Lima explains what principal component analysis is and shows how to do it in R:
Three lines of code and we see a clear separation among grape vine cultivars. In addition, the data points are evenly scattered over relatively narrow ranges in both PCs. We could next investigate which parameters contribute the most to this separation and how much variance is explained by each PC, but I will leave it for pcaMethods. We will now repeat the procedure after introducing an outlier in place of the 10th observation.
PCA is extremely useful when you have dozens of contributing factors, as it lets you narrow in on the big contributors quickly.