title: How to store number of specific characters from a matrix into another vector in R
body: <pre><code>&gt; f
  [,1] [,2] [,3] 
  [1,] "A"  "B"  "A"
  [2,] "B"  "B"  "B"
  [3,] "B"  "B"  "C"
  </code></pre>
  
  <p>Let's consider that I have generated a matrix like the one above. I want to store  the number of specific characters (eg: "B") from the above matrix into a separate vector.</p>
  
  <p>I am expecting a result like this:</p>
  
  <pre><code>f_B
  [1] 2 3 1
  </code></pre>
  
  <p>f_B is another vector </p>