title: R Error in x$ed : $ operator is invalid for atomic vectors
body: <p>Here is my code:</p>
  
  <pre><code>x&lt;-c(1,2)
  x
  names(x)&lt;- c("bob","ed")
  x$ed
  </code></pre>
  
  <p>Why do I get the following error?</p>
  
  <blockquote>
    <p>Error in x$ed : $ operator is invalid for atomic vectors</p>
  </blockquote>