# Exercise 6. PCA
###### tags: `exercise`
## Instructions
- Be sure to include your name on your answers.
- Before attempting this exercise, please walk through the code from class on October 6 and 20.
- Below are Problems which should all be achievable using the information in the tutorial. Challenges will require you to find resources or answers on your own. (Hint: Try googling "how to … in R".)
- Create a HackMD note to share your answers to these prompts. Copy the prompts, add your code and explanatory text and images. Use markdown formatting to distinguish the prompts from the code and explanatory text of your answers.
- Please complete this assignment individually. Discussing the problems with others is acceptable. However, keep in mind that your goal here should be to build a skill you can use going forward. Copying code you don't understand will not help you in the long run!
- Submit your answers by sharing the note with Dr. Angelini before Friday at dawn.
---
### Problem 1
Perform PCA on the curated, GPA-aligned bumblebee forewing dataset `Bombus.forewings`, which you used in Exercise 5. Examine the distribution of variance associated with each principal component axis using the functions `pcvar` and `scree.plot`.
What does it mean if the first principal component axis has by far the most variance? What does it mean if variance is spread across multiple axes? How does this influence your interpretation of the shape data?
#### Challenge 1
Save this data objects from this analysis together in one file in your working directory. Then load them back into R's environment and make it verbose. Show your code. (Hint: Google how to do this "in R".)
#### Challenge 2
Replicate the GPA and PCA steps using the *Bombus borealis* and *B. fervidus* outline images and the functions from the `Momocs` package. Include a image of the PCA shape space.
---
**Quick Links** | [BI377 Moodle](https://moodle.colby.edu/course/view.php?id=33250) | [BI377 HackMD](https://hackmd.io/@ColbyBI377/landingpage) | [rstudo.colby.edu](https://rstudio.colby.edu/)
---