ction level2">
<h2>Answer templates</h2>
<p>Here are some answer templates for Exercises 2 and 3. You will need to fill in the “…” (Note: these chunks have the option set <code>eval=FALSE</code> so that this document compiles; you will have to remove these if you want to run these chunks on compilation.)</p>
<div id="exercise-2" class="section level3">
<h3>Exercise 2</h3>
<pre class="r"><code>#&#39; Compute the likelihood for allele frequences p given genotype data x
#&#39; @param p an R vector of all