Saturday, 4 February 2017

covariance matrix plot

<
# Load the  dataset.
data(data name)
 
# Plot #1: Basic scatterplot matrix of the four measurements
pairs(~x1+x2+x3+x4, data=data name)


or

in corrplot package, named "circle""square""ellipse""number""shade""color""pie".
library(corrplot)
M <- cor(mtcars)
corrplot(M, method="circle")

corrplot(M, method="number")
data(iris)
cor(iris[,1:4])
pairs(iris[,1:4])

No comments:

Post a Comment