However, take into account that the contribution of the variables to the principal components depends also on the variance of each variable. This can be misleading if different variables have different unit of measurements, because in that case you would be comparing apples with oranges. To avoid this problem, if your variables have different units of measurements, you should standardize the data first: see for example

https://onlinecourses.science.psu.edu/stat505/node/55/

In R, you can also achieve this simply by (X is your design matrix):

`prcomp(X, scale = TRUE)`

By the way, independently of whether you choose to scale your original variables or not, you should always center them before computing the PCA. I believe this should be done automatically by `prcomp`

, but you can verify it by running

`prcomp(X)`

and

`prcomp(X, center = TRUE)`

and checking that the results are the same.