Read that page here
http://www.r-bloggers.com/principal-components-regression-pt-3-picking-the-number-of-components/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+RBloggers+%28R+bloggers%29
I'll put it as a student's project to get started
I'll put it as a student's project to get started