Reputation: 15
Im new to R and cleaned the https://www.kaggle.com/camnugent/california-housing-prices dataset (removed Ocean_proximity column) and used this function on it
housing.pca <- prcomp(housing, center = TRUE,scale. = TRUE)
The summary tells me a Proportion of Variance 0.2483 0.2187 0.2014 0.1753 ...
I now want to use a scatterplot matrix to visualize the first 4 PCA Components but i cant figure out how and couldnt find any help
Upvotes: 0
Views: 1079
Reputation: 5204
Run plot(as.data.frame(housing.pca$x[,1:4]))
for the first 4 principal components.
Upvotes: 1