0

I have an excel file containing the data shown here. I want to create a dot plot using ggplot2. I want to put mutations (shown in column) in X axis and Clade (shown in Rows like Alpha, Beta, Gamma etc.) in Y axis. I can't put multiple variables in X axis.

enter image description here

James Z
  • 12,209
  • 10
  • 24
  • 44
  • 1
    You'd probably have to `tidyr::pivot_longer()` to reshape the data from wide to long format. – teunbrand Jan 12 '22 at 13:11
  • Hi! Is it possible to share with us a reproducible example? However, you'll have to use the `pivot_longer` function of the `tidyr` package before using the `ggplot2` package. – Luis Jan 12 '22 at 17:08
  • Thanks a lot teunbrand & Luis. I have tried tidyr and able to perform what I intended to do. Thanks again. – Abdullah Omar Nasif Tanim Jan 13 '22 at 03:55
  • 1
    Next time provide a reproducible example: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example with your code read in and what you have tried. – william3031 Jan 21 '22 at 03:54

0 Answers0