title: Getting x axis names for a bargraph in R from a column in a csv file
body: <p>I'm trying to plot a bargraph of a subset of data that has been ordered according to increasing row sums using R. </p>
  
  <p>The names of the rows are in column 2 of the csv file I'm working from and I'm not sure how to get them matched with the proper bar on the bargraph as the current way I'm writing the code (shown below) just orders the names as they appear in the csv file. </p>
  
  <p>Any help would be much appreciated!</p>
  
  <pre><code>y &lt;- rowSums(domaincolumns)
  
  orderingdatasourcesdomain &lt;- y[order(y)]
  
  barplot(orderingdatasourcesdomain, las=2, names.arg = **MyData[,2]**,
    main = "Number of Domains Covered by Each Source", xlab = "Source",
    ylab = "Number of Domains")
  </code></pre>