title: Computing probabilities in R
body: <p>I have two questions, that I'd like to use R to solve.</p>
  
  <p>I have a vector of values which distribution is unknown.</p>
  
  <ol>
  <li>How do I calculate the probability of one of the values in the
  vector in R </li>
  <li>How do I calculate the probability of one value
  happening by simulating 1000 times</li>
  </ol>
  
  <p>my test data is as follows:</p>
  
  <pre><code>values_all &lt;- c(rep(1, 3), rep(2, 5), rep(3, 2), 4, rep(5, 4), rep(6, 2), rep(7, 3))
  prob_to_find &lt;- 5
  </code></pre>
  
  <p>Grateful for any assistance.</p>