I would like to create a spaghetti plot similar to this one here
.
Unfortunately my data looks like this
.
I have 11 columns that have NA's, so I remove them with
neuron1 <- drop_na(neuron)
Then I have a datatable with 13 columns and 169 rows. My goal is to display the expression of each gene across these 169 rows. Basically I would only need the "area" on the x-axis and on the y-axis the 11 genes. I am able to plot the data, but only when selecting the genes specifically e.g with this code:
ggplot(neuron1, aes(area)) +
geom_line(aes(y=MAP2, group=1)) +
geom_line(aes(y=REEP1, group=1, color="red"))
It would be okay to repeat this 11 times but I have some datasets with more genes so it would really be nice to be able to group them properly and then run a short code.
Thank you very much in advance!