I have two dataframes which are RMA normalized as
set.seed(1)
X <- data.frame(matrix(rnorm(20), nrow=10))
Y <- data.frame(matrix(rnorm(20), nrow=10))
The columns are the gene expression levels and the rows are the genes. How to plot the density distribution of covariance of gene expression levels of X and distribution of covariance of gene expression levels Y in a single plot. It is something like this but I would like to study the distribution of the entire dataframe than columns.enter link description here
I tried using
plot (density(X), col="red",ylim=c(0,3.5),xlim=c(-1,2))
lines (density(Y), col="green")
But I get an error
Error in density.default() : argument 'x' must be numeric