0

I have data in csv format which as following:

Sample_id,A1,A2,A3,B1,B2,B3,C1,C2,C3,C4,C5
Pat1,0,0,0,0.064516129,0.919354839,0.056451613,0.040322581,0,0.14516129,0.14516129,0
Pat2,0,0,0,0,0.459677419,0,0.008064516,0,0.016129032,0.241935484,0
Pat2,0,0,0,0.967741935,1,0,0,0,0,0,0
Pat2,0,0,0,0.951612903,1.483870968,0,0,0,0,0,0
Pat2,0,0,0,0.064516129,0.838709677,0,0,0,0,0,0

I want to make grouped bar chart for the same such that column 1 (i.e. Pat1, Pat2..) is on x-axis and and respective values are plotted on y-axis. I got one solution online where we have to write each column into different vector of a data frame , but my problem my files is relatively large. Can someone please help me with the same

pogibas
  • 27,303
  • 19
  • 84
  • 117
  • Welcome to SO! Please, add some fake data to copy and paste in R, your attempts and desired output, those are going to increase the odds to get a good answer. – s__ Sep 12 '18 at 09:24
  • Here is a nice example: https://stackoverflow.com/questions/18158461/grouped-bar-plot-in-ggplot and https://www.r-graph-gallery.com/48-grouped-barplot-with-ggplot2/ – Saurabh Chauhan Sep 12 '18 at 09:41

0 Answers0