title: Getting the most frequent element in a factor in R
body: <p>I have a set of strings in a R variable, when I check the class, it says it is a factor.
  eg.</p>
  
  <pre><code>mySet&lt;-c("abc","abc","def","abc","def","efg","abc")
  </code></pre>
  
  <p>I want to get the string which occurs the maximum number of times in this set(i.e."abc" in this case).</p>
  
  <p>I understand one approach is to use the <code>hist()</code> but I am facing data type issues and since I'm new to R I wasn't able to crack this one by myself. </p>