我正在尝试使用此网站上的脚本制作火山图(向下滚动以获取火山图脚本):http://www.sthda.com/english/wiki/ggplot2-texts-add-text-annotations-to-a-graph-in-r-software
但我最终遇到此错误:
EM <- read.csv(file = "C:/Users/emlog.csv", header = TRUE)
EM$sig <- ifelse(EM$logpv < 0.05, "P-Value < 0.05", "Not Sig")
volcanoEM <- ggplot(EM, aes(x= logfc, y=logpv)) +
geom_point(aes(color=sig)) +
scale_color_manual(values = c("red", "grey")) +
theme_bw(base_size = 12) +
theme(legend.position = "right") +
geom_text_repel(data = subset(EM, logpv < 0.05), aes(label = EM$rtmz), size=5, box.padding = unit(0.35, "lines"), point.padding = unit(0.3, "lines"))
plot(volcanoEM)
错误:美学的长度必须为1或与数据相同(58):label,x,y
不确定如何从这里继续。