Correlation plot
R offers other ways of displaying the correlation matrix. With the corrplot package, the visualization of correlations is made easier and more powerful by allowing you to represent the correlations with numbers, symbols, colors, and more.
In this exercise, you will use the provided correlation matrix cor_mat and the corrplot() function to draw some correlation charts.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Visualizing Time Series Data in R
คำแนะนำการฝึกหัด
- Plot the correlation matrix of
cor_matusing default settings - Change the
methodto display numbers instead of circles - Change the
methodto display colors instead circles - Display only the upper triangle of the correlation matrix using numbers
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Create correlation matrix
# Create correlation matrix with numbers
# Create correlation matrix with colors
# Create upper triangle correlation matrix