原文链接:使用ggplot2绘制带星号"*"的热图
本期教程内容
本期教程所有数据和代码,及往期教程数据和代码可在社群中获得
绘制教程
- 导入相关的R包
###'@导入相关的R包
library(readxl)
library(tidyverse)
library(readxl)
library(ggsci)
library(viridis)
library(RColorBrewer)
- 导入数据
corr_data <- read_excel("20240325_input.xlsx",sheet = "Sheet1")
corr_data[1:5,1:10]
> corr_data[1:5,1:10]
# A tibble: 5 × 10
Conjugation Taxa visit estimate statistic p.value method alternative fdr p_label
<chr> <chr> <chr> <dbl> <dbl> <dbl> <chr> <chr> <dbl> <chr>
1 Ala Bacteroides 0-4D 0.151 168508. 0.122 Spearman's rank correlation r… two.sided 0.285 NA
2 Ala Bacteroides 1M -0.223 278640. 0.0189 Spearman's rank correlation r… two.sided 0.0882 NA
3 Ala Bacteroides 12M -0.134 231518. 0.169 Spearman's rank correlation r… two.sided 0.311 NA
4 Ala Bifidobacterium 0-4D -0.0359 205606. 0.715 Spearman's rank correlation r… two.sided 0.834 NA