How to implement PCA from scratch in R

What is PCA ?

Principal component analysis (PCA) is an approach based on the singular value decomposition of the data.
The goal of PCA is reduce the dimension of the data you are using by projecting this data into the sub-space