df <- as_qts_sample(vespa64$igp[1:16])
res_pca <- prcomp(df)
# You can plot the effect of a PC on the mean
plot(res_pca, what = "PC1")
# You can plot the data points in a PC plane
plot(res_pca, what = "scores")
Run the code above in your browser using DataLab