title: What is the equivalent to $ when working with atomic vectors?
body: <p>I made a sample of a dataset named <code>test_data</code>. I want to find the missing values in the column named <code>relat_age</code> which is a <code>factor</code>.</p>
  <p>The code I used is:</p>
  <pre><code>sum(test_data$relat_age==&quot;&quot;)
  </code></pre>
  <p>Furthermore, I tried to find the average age using column <code>Age_last_bday</code>, an <code>integer</code> using</p>
  <pre><code>mean(test_data$Age_last_bday)
  </code></pre>
  <p>Both returned error</p>
  <blockquote>
  <p>$ operator is invalid for atomic vectors.</p>
  </blockquote>