data(aflw)
aflw_std <- apply(aflw[,7:35], 2, function(x)
(x-mean(x, na.rm=TRUE))/
sd(x, na.rm=TRUE))
aflw_pca <- prcomp(aflw_std[,c("goals","behinds",
"kicks","disposals")])
ggscree(aflw_pca, q=3)
Run the code above in your browser using DataLab