I am trying to generate a (grouped) density plot with significance test
I did it with boxplots (with ggsignif
packages) but I don't know how to do in densityplot
setwd("~/myData")
data<-read.delim("genes.txt", head=T, row.names = 1)
data$Variance<-apply(data, 1, var)
head(data)
dim(data)
library(ggplot2)
library(ggsignif)
ggplot(data, aes(x=variance, col=type)) +geom_density() )
geom_signif(comparisons = list(c("normal", "traited")),map_signif_level=TRUE)
i have this error:
error in f(...)
can oly handle data with groupes that are plotted on the x-axis