Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

R language ggplot2 how to draw a square heat map and show the correlation coefficient

Shulou Source: shulou.com Published: 2022-06-01 22:07:19 10月03日 Update

R language ggplot2 how to draw a square heat map and show the correlation coefficient, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail, people with this need can come to learn, I hope you can gain something.

The first step of the text version is to do correlation analysis to obtain the correlation coefficient.

The data format that needs to be prepared for correlation analysis in R language is as follows: each row is a sample, each column is a variable, stored in excel, and then saved as csv format data

Image.png

If you need sample data, you can leave a message at the end of the text.

The first is to read in the data df

Tags: Coefficients data format heat map next correlation analysis language function text matrix help square square clarity digits content variables coordinates axis Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker NVidia Shulou Information Xiaomi Microsoft