title: CRAN mirror in Rmarkdown
body: <p>I am very new to Rmarkdown, and I am having problems with setting up libraries that I will use later in my document.  </p>
  
  <p>My .Rmd file: </p>
  
  <pre><code># Rmarkdown for tree
  #### 
  #### 
  
  ### load packages
  ```{r}
  library(ctv)
  install.views('Phylogenetics')
  update.views('Phylogenetics')
  library(ape)
  library(adegenet)
  library(phangorn)
  ```
  </code></pre>
  
  <p>The error message that I will get is </p>
  
  <pre><code>error in available.views(repos = repos) : trying to use CRAN without setting a mirror Calls: 
  &lt;Anonymous&gt; ... install.views -&gt; .get_pkgs_from_ctv_or_repos -&gt; available.views
  </code></pre>
  
  <p>How do I install packages successfully so that my downstream analyses will work?</p>
  
  <p>Thanks!</p>