title: Plot R vector with keys as X-axis and values as Y-axis
body: <p>I have a vector created from a list as such:</p>
  
  <pre><code>l1 = list()
  l1["a"] = 5.5
  l1["b"] = 3.4
  l1["c"] = 9.2
  
  v1 = unlist(l1)
  v1 = sort(v1, decreasing = F, index.return = T)
  </code></pre>
  
  <p>With this new vector I am trying to plot a line graph so that the 'keys' ("a", "b", "c") are labeled on the x-axis and the 'values' (5.5, 3.4, 9.2) are labeled on the y-axis. So far I have tried the following.</p>
  
  <pre><code>plot(v1, col = "red")
  line(v1, col = "black")
  </code></pre>
  
  <p>I receive the error</p>
  
  <pre><code>Error in xy.coords(x, y, xlabel, ylabel, log) : 
    'x' is a list, but does not have components 'x' and 'y'
  Calls: plot -&gt; plot -&gt; plot.default -&gt; xy.coords
  </code></pre>