<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />




<title>exercise solutions</title>

<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/simplex.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/textmate.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
<link href="site_libs/font-awesome-5.0.13/css/fa-svg-with-js.css" rel="stylesheet" />
<script src="site_libs/font-awesome-5.0.13/js/fontawesome-all.min.js"></script>
<script src="site_libs/font-awesome-5.0.13/js/fa-v4-shims.min.js"></script>

<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
  pre:not([class]) {
    background-color: white;
  }
</style>
<script type="text/javascript">
if (window.hljs) {
  hljs.configure({languages: []});
  hljs.initHighlightingOnLoad();
  if (document.readyState && document.readyState === "complete") {
    window.setTimeout(function() { hljs.initHighlighting(); }, 0);
  }
}
</script>



<style type="text/css">
h1 {
  font-size: 34px;
}
h1.title {
  font-size: 38px;
}
h2 {
  font-size: 30px;
}
h3 {
  font-size: 24px;
}
h4 {
  font-size: 18px;
}
h5 {
  font-size: 16px;
}
h6 {
  font-size: 12px;
}
.table th:not([align]) {
  text-align: left;
}
</style>


</head>

<body>

<style type = "text/css">
.main-container {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}
code {
  color: inherit;
  background-color: rgba(0, 0, 0, 0.04);
}
img {
  max-width:100%;
  height: auto;
}
.tabbed-pane {
  padding-top: 12px;
}
.html-widget {
  margin-bottom: 20px;
}
button.code-folding-btn:focus {
  outline: none;
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
  padding-top: 51px;
  padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar)  */
.section h1 {
  padding-top: 56px;
  margin-top: -56px;
}

.section h2 {
  padding-top: 56px;
  margin-top: -56px;
}
.section h3 {
  padding-top: 56px;
  margin-top: -56px;
}
.section h4 {
  padding-top: 56px;
  margin-top: -56px;
}
.section h5 {
  padding-top: 56px;
  margin-top: -56px;
}
.section h6 {
  padding-top: 56px;
  margin-top: -56px;
}
</style>

<script>
// manage active state of menu based on current page
$(document).ready(function () {
  // active menu anchor
  href = window.location.pathname
  href = href.substr(href.lastIndexOf('/') + 1)
  if (href === "")
    href = "index.html";
  var menuAnchor = $('a[href="' + href + '"]');

  // mark it active
  menuAnchor.parent().addClass('active');

  // if it's got a parent navbar menu mark it active as well
  menuAnchor.closest('li.dropdown').addClass('active');
});
</script>


<div class="container-fluid main-container">

<!-- tabsets -->
<script>
$(document).ready(function () {
  window.buildTabsets("TOC");
});
</script>

<!-- code folding -->




<script>
$(document).ready(function ()  {

    // move toc-ignore selectors from section div to header
    $('div.section.toc-ignore')
        .removeClass('toc-ignore')
        .children('h1,h2,h3,h4,h5').addClass('toc-ignore');

    // establish options
    var options = {
      selectors: "h1,h2,h3",
      theme: "bootstrap3",
      context: '.toc-content',
      hashGenerator: function (text) {
        return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_').toLowerCase();
      },
      ignoreSelector: ".toc-ignore",
      scrollTo: 0
    };
    options.showAndHide = true;
    options.smoothScroll = true;

    // tocify
    var toc = $("#TOC").tocify(options).data("toc-tocify");
});
</script>

<style type="text/css">

#TOC {
  margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
  position: relative;
  width: 100%;
}
}


.toc-content {
  padding-left: 30px;
  padding-right: 40px;
}

div.main-container {
  max-width: 1200px;
}

div.tocify {
  width: 20%;
  max-width: 260px;
  max-height: 85%;
}

@media (min-width: 768px) and (max-width: 991px) {
  div.tocify {
    width: 25%;
  }
}

@media (max-width: 767px) {
  div.tocify {
    width: 100%;
    max-width: none;
  }
}

.tocify ul, .tocify li {
  line-height: 20px;
}

.tocify-subheader .tocify-item {
  font-size: 0.90em;
  padding-left: 25px;
  text-indent: 0;
}

.tocify .list-group-item {
  border-radius: 0px;
}


</style>

<!-- setup 3col/9col grid for toc_float and main content  -->
<div class="row-fluid">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>

<div class="toc-content col-xs-12 col-sm-8 col-md-9">




<div class="navbar navbar-default  navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="index.html">intro-r-gis</a>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li>
  <a href="index.html">Home</a>
</li>
<li>
  <a href="setup.html">Setup</a>
</li>
<li>
  <a href="license.html">License</a>
</li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li>
  <a href="https://github.com/annakrystalli/intro-r-gis">
    <span class="fa fa-github"></span>
     
  </a>
</li>
      </ul>
    </div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

<!-- Add a small amount of space between sections. -->
<style type="text/css">
div.section {
  padding-top: 12px;
}
</style>

<div class="fluid-row" id="header">



<h1 class="title toc-ignore">exercise solutions</h1>

</div>


<p><strong>Last updated:</strong> 2018-09-04</p>
<strong>workflowr checks:</strong> <small>(Click a bullet for more information)</small>
<ul>
<li>
<p><details> <summary> <strong style="color:blue;">✔</strong> <strong>R Markdown file:</strong> up-to-date </summary></p>
<p>Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.</p>
</details>
</li>
<li>
<p><details> <summary> <strong style="color:blue;">✔</strong> <strong>Environment:</strong> empty </summary></p>
<p>Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.</p>
</details>
</li>
<li>
<p><details> <summary> <strong style="color:blue;">✔</strong> <strong>Seed:</strong> <code>set.seed(20180820)</code> </summary></p>
<p>The command <code>set.seed(20180820)</code> was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.</p>
</details>
</li>
<li>
<p><details> <summary> <strong style="color:blue;">✔</strong> <strong>Session information:</strong> recorded </summary></p>
<p>Great job! Recording the operating system, R version, and package versions is critical for reproducibility.</p>
</details>
</li>
<li>
<p><details> <summary> <strong style="color:blue;">✔</strong> <strong>Repository version:</strong> <a href="https://github.com/annakrystalli/intro-r-gis/tree/33607af14ab2423a323b06a0ac0a5fa679aee131" target="_blank">33607af</a> </summary></p>
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated. <br><br> Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use <code>wflow_publish</code> or <code>wflow_git_commit</code>). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
<pre><code>
Ignored files:
    Ignored:    .DS_Store
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    data/.DS_Store

Untracked files:
    Untracked:  .Rbuildignore
    Untracked:  analysis/mapping.Rmd
    Untracked:  data-raw/
    Untracked:  data/csv/
    Untracked:  data/raster/
    Untracked:  data/sf/

Unstaged changes:
    Modified:   analysis/index.Rmd
    Modified:   analysis/vector.Rmd

</code></pre>
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes. </details>
</li>
</ul>
<details> <summary> <small><strong>Expand here to see past versions:</strong></small> </summary>
<ul>
<table style="border-collapse:separate; border-spacing:5px;">
<thead>
<tr>
<th style="text-align:left;">
File
</th>
<th style="text-align:left;">
Version
</th>
<th style="text-align:left;">
Author
</th>
<th style="text-align:left;">
Date
</th>
<th style="text-align:left;">
Message
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;">
Rmd
</td>
<td style="text-align:left;">
<a href="https://github.com/annakrystalli/intro-r-gis/blob/33607af14ab2423a323b06a0ac0a5fa679aee131/analysis/exercise_solutions.Rmd" target="_blank">33607af</a>
</td>
<td style="text-align:left;">
annakrystalli
</td>
<td style="text-align:left;">
2018-09-04
</td>
<td style="text-align:left;">
workflowr::wflow_publish(“analysis/exercise_solutions.Rmd”)
</td>
</tr>
<tr>
<td style="text-align:left;">
html
</td>
<td style="text-align:left;">
<a href="https://cdn.rawgit.com/annakrystalli/intro-r-gis/0a20853aa681a9c8b3d11adfa35fa7fd23545c59/docs/exercise_solutions.html" target="_blank">0a20853</a>
</td>
<td style="text-align:left;">
annakrystalli
</td>
<td style="text-align:left;">
2018-09-04
</td>
<td style="text-align:left;">
Build site.
</td>
</tr>
<tr>
<td style="text-align:left;">
Rmd
</td>
<td style="text-align:left;">
<a href="https://github.com/annakrystalli/intro-r-gis/blob/6d820c1e05d54231e20681e5272369d4a7581f7a/analysis/exercise_solutions.Rmd" target="_blank">6d820c1</a>
</td>
<td style="text-align:left;">
annakrystalli
</td>
<td style="text-align:left;">
2018-09-04
</td>
<td style="text-align:left;">
workflowr::wflow_publish(c(“analysis/exercise_solutions.Rmd”))
</td>
</tr>
</tbody>
</table>
</ul>
<p></details></p>
<hr />
<div id="vector-spatial-data" class="section level2">
<h2>Vector spatial data</h2>
<div id="add-a-nose" class="section level4">
<h4>1) add a nose!</h4>
<p>Create a nose geometry, combine all the shapes into a single <code>sf</code> and then plot the face.</p>
<pre class="r"><code>nose &lt;- st_linestring(x = matrix(c(1, -1, 1, -2), ncol = 2, byrow = T))
sfc &lt;- st_sfc(points, line, nose)
face &lt;- st_sf(data.frame(shape = c(&quot;eyes&quot;, &quot;mouth&quot;, &quot;nose&quot;), geom = sfc))
plot(face)</code></pre>
<p><img src="figure/exercise_solutions.Rmd/unnamed-chunk-2-1.png" width="672" style="display: block; margin: auto;" /></p>
<details> <summary><em>Expand here to see past versions of unnamed-chunk-2-1.png:</em></summary>
<table style="border-collapse:separate; border-spacing:5px;">
<thead>
<tr>
<th style="text-align:left;">
Version
</th>
<th style="text-align:left;">
Author
</th>
<th style="text-align:left;">
Date
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;">
<a href="https://github.com/annakrystalli/intro-r-gis/blob/0a20853aa681a9c8b3d11adfa35fa7fd23545c59/docs/figure/exercise_solutions.Rmd/unnamed-chunk-2-1.png" target="_blank">0a20853</a>
</td>
<td style="text-align:left;">
annakrystalli
</td>
<td style="text-align:left;">
2018-09-04
</td>
</tr>
</tbody>
</table>
<p></details></p>
</div>
<div id="what-are-the-coordinates-for-the-10th-point-in-the-mexico-polygon" class="section level4">
<h4>2) What are the coordinates for the 10th point in the Mexico polygon?</h4>
<pre class="r"><code>mx_coords &lt;- world %&gt;% filter(iso_a2 == &quot;MX&quot;) %&gt;% st_coordinates() 

mx_coords[10, c(&quot;X&quot;, &quot;Y&quot;)]</code></pre>
<pre><code>         X          Y 
-106.50759   31.75452 </code></pre>
</div>
<div id="how-about-in-crs-mexico-itrf92-utm-zone-15n" class="section level4">
<h4>3) How about in CRS <a href="https://epsg.io/4488">Mexico ITRF92 / UTM zone 15N</a></h4>
<p>(hint: use <code>st_transform</code> to change the projection first)</p>
<pre class="r"><code>mx_utm15 &lt;- world %&gt;% 
    st_transform(crs = 4488) 

mx_coords &lt;- mx_utm15 %&gt;%
    filter(iso_a2 == &quot;MX&quot;) %&gt;% 
    st_coordinates() 

mx_coords[10, c(&quot;X&quot;, &quot;Y&quot;)]</code></pre>
<pre><code>        X         Y 
-784546.6 3593838.9 </code></pre>
</div>
<div id="are-these-coordinates-projected-or-not-can-you-tell-by-just-looking-at-the-crs-in-the-transformed-sf-object" class="section level4">
<h4>4) Are these coordinates projected or not? Can you tell by just looking at the CRS in the transformed <code>sf</code> object?</h4>
<pre class="r"><code>mx_utm15</code></pre>
<pre><code>Simple feature collection with 177 features and 10 fields
geometry type:  MULTIPOLYGON
dimension:      XY
bbox:           xmin: -11779910 ymin: -19977280 xmax: 17183260 ymax: 19983850
epsg (SRID):    4488
proj4string:    +proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
First 10 features:
   iso_a2        name_long     continent region_un          subregion
1      FJ             Fiji       Oceania   Oceania          Melanesia
2      TZ         Tanzania        Africa    Africa     Eastern Africa
3      EH   Western Sahara        Africa    Africa    Northern Africa
4      CA           Canada North America  Americas   Northern America
5      US    United States North America  Americas   Northern America
6      KZ       Kazakhstan          Asia      Asia       Central Asia
7      UZ       Uzbekistan          Asia      Asia       Central Asia
8      PG Papua New Guinea       Oceania   Oceania          Melanesia
9      ID        Indonesia          Asia      Asia South-Eastern Asia
10     AR        Argentina South America  Americas      South America
                type    area_km2       pop  lifeExp gdpPercap
1  Sovereign country    19289.97    885806 69.96000  8222.254
2  Sovereign country   932745.79  52234869 64.16300  2402.099
3      Indeterminate    96270.60        NA       NA        NA
4  Sovereign country 10036042.98  35535348 81.95305 43079.143
5            Country  9510743.74 318622525 78.84146 51921.985
6  Sovereign country  2729810.51  17288285 71.62000 23587.338
7  Sovereign country   461410.26  30757700 71.03900  5370.866
8  Sovereign country   464520.07   7755785 65.23000  3709.082
9  Sovereign country  1819251.33 255131116 68.85600 10003.089
10 Sovereign country  2784468.59  42981515 76.25200 18797.548
                             geom
1  MULTIPOLYGON (((-11776327 -...
2  MULTIPOLYGON (((7508185 -19...
3  MULTIPOLYGON (((9294103 882...
4  MULTIPOLYGON (((-1664512 58...
5  MULTIPOLYGON (((-1664512 58...
6  MULTIPOLYGON (((473784.4 14...
7  MULTIPOLYGON (((3108708 149...
8  MULTIPOLYGON (((-6664974 -1...
9  MULTIPOLYGON (((-6664974 -1...
10 MULTIPOLYGON (((2134436 -61...</code></pre>
<p>We’ve already talked about UTM being projected CRSs but there is also a hint in the <code>proj4string</code>, in particular <code>+units=m</code> indicating that the units are linear (m).</p>
<p>We can also extract the units from an <code>sf</code>s crs using function <code>sf::st_crs()</code> and accessing the units</p>
<pre class="r"><code>st_crs(mx_utm15)$units</code></pre>
<pre><code>[1] &quot;m&quot;</code></pre>
</div>
</div>
<div id="raster-spatial-data" class="section level2">
<h2>Raster spatial data</h2>
<div id="create-and-plot-a-new-rasterlayer-of-rough-mean-temperature-in-degrees-c" class="section level4">
<h4>1) Create and plot a new <code>rasterLayer</code> of rough mean temperature in degrees C</h4>
<p>(rough because it would be much better to use more data at higher temporal resolution, eg at least monthly, not extremes).</p>
<p>We can do this using a simple mean calculation:</p>
<pre class="r"><code>rough_mean &lt;- ((full_stack[[&quot;mx.bio_5&quot;]] + full_stack[[&quot;mx.bio_6&quot;]])/2)/10</code></pre>
<p>But we can even use r functions, in this case <code>mean()</code></p>
<pre class="r"><code>rough_mean &lt;- mean(full_stack[[&quot;mx.bio_5&quot;]], full_stack[[&quot;mx.bio_6&quot;]])/10</code></pre>
<pre class="r"><code>rough_mean</code></pre>
<pre><code>class       : RasterLayer 
dimensions  : 563, 811, 456593  (nrow, ncol, ncell)
resolution  : 0.008333333, 0.008333333  (x, y)
extent      : -101.85, -95.09167, 16.94167, 21.63333  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
data source : /Users/Anna/Documents/workflows/workshops/intro-r-gis/data/raster/rough_mean.tif 
names       : rough_mean 
values      : -1.45, 29.6  (min, max)</code></pre>
<pre class="r"><code>levelplot(rough_mean, margin = F)</code></pre>
<p><img src="figure/exercise_solutions.Rmd/unnamed-chunk-11-1.png" width="672" style="display: block; margin: auto;" /></p>
<details> <summary><em>Expand here to see past versions of unnamed-chunk-11-1.png:</em></summary>
<table style="border-collapse:separate; border-spacing:5px;">
<thead>
<tr>
<th style="text-align:left;">
Version
</th>
<th style="text-align:left;">
Author
</th>
<th style="text-align:left;">
Date
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;">
<a href="https://github.com/annakrystalli/intro-r-gis/blob/0a20853aa681a9c8b3d11adfa35fa7fd23545c59/docs/figure/exercise_solutions.Rmd/unnamed-chunk-11-1.png" target="_blank">0a20853</a>
</td>
<td style="text-align:left;">
annakrystalli
</td>
<td style="text-align:left;">
2018-09-04
</td>
</tr>
</tbody>
</table>
<p></details></p>
</div>
<div id="calculate-mean-precipitation-seasonality-for-the-extraction-bounding-box-area.-what-is-the-value" class="section level4">
<h4>2) Calculate mean precipitation seasonality for the <strong>extraction bounding box area</strong>. What is the value?</h4>
<pre class="r"><code>mean_prec_seasonality &lt;- extract(env_stack[[&quot;prec_seasonality&quot;]], 
                as_Spatial(extract_bbox),
                fun = mean,
                na.rm = T)

mean_prec_seasonality</code></pre>
<pre><code>         [,1]
[1,] 87.78957</code></pre>
</div>
<div id="add-a-column-indicating-whether-data-points-are-greater-than-true-or-less-than-false-extraction-area-mean-precipitation-seasonality." class="section level4">
<h4>3) Add a column indicating whether data points are greater than (<code>TRUE</code>) or less than (<code>FALSE</code>) extraction area mean precipitation seasonality.</h4>
<pre class="r"><code>mol_env_sf &lt;- mol_env_sf %&gt;% 
    mutate(greater_mean_ps = 
               prec_seasonality &gt; as.vector(mean_prec_seasonality))

mol_env_sf %&gt;% select(locality, greater_mean_ps)</code></pre>
<pre><code>Simple feature collection with 15 features and 2 fields
geometry type:  POINT
dimension:      XY
bbox:           xmin: -99.84806 ymin: 18.94194 xmax: -97.09056 ymax: 19.63083
epsg (SRID):    4326
proj4string:    +proj=longlat +datum=WGS84 +no_defs
# A tibble: 15 x 3
   locality               greater_mean_ps             geometry
   &lt;chr&gt;                  &lt;lgl&gt;                    &lt;POINT [°]&gt;
 1 Nevado de Toluca       FALSE           (-99.84806 19.19361)
 2 Texcalyacac            TRUE                (-99.5 19.12056)
 3 Desierto de los Leones TRUE            (-99.30056 19.26667)
 4 Ajusco                 TRUE                (-99.3 19.18278)
 5 Calpan                 TRUE            (-98.59167 19.13139)
 6 Atzompa                TRUE            (-98.55972 19.18056)
 7 Llano Grande           FALSE           (-98.72056 19.33889)
 8 Rio Frio               FALSE           (-98.69472 19.36611)
 9 Nanacamilpa            FALSE           (-98.59611 19.48028)
10 MalincheS              FALSE           (-98.02194 19.18722)
11 MalincheW              FALSE             (-98.095 19.25778)
12 MalincheE              FALSE                (-97.975 19.23)
13 Texmalaquilla          FALSE              (-97.29 18.94194)
14 Xometla                FALSE             (-97.19056 18.975)
15 Vigas                  FALSE           (-97.09056 19.63083)</code></pre>
</div>
</div>
<div id="session-information" class="section level2">
<h2>Session information</h2>
<pre class="r"><code>sessionInfo()</code></pre>
<pre><code>R version 3.4.4 (2018-03-15)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.3

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] bindrcpp_0.2.2      spData_0.2.9.3      ggplot2_3.0.0      
 [4] dplyr_0.7.6         sf_0.6-3            rasterVis_0.45     
 [7] latticeExtra_0.6-28 RColorBrewer_1.1-2  lattice_0.20-35    
[10] raster_2.6-7        sp_1.2-5           

loaded via a namespace (and not attached):
 [1] zoo_1.8-3         tidyselect_0.2.4  purrr_0.2.5      
 [4] colorspace_1.3-2  htmltools_0.3.6   viridisLite_0.3.0
 [7] yaml_2.1.19       utf8_1.1.3        rlang_0.2.1      
[10] R.oo_1.21.0       e1071_1.6-8       hexbin_1.27.1    
[13] pillar_1.2.1      glue_1.2.0.9000   withr_2.1.2      
[16] DBI_1.0.0         R.utils_2.6.0     bindr_0.1.1      
[19] plyr_1.8.4        stringr_1.3.1     munsell_0.5.0    
[22] gtable_0.2.0      workflowr_1.0.1   R.methodsS3_1.7.1
[25] evaluate_0.11     knitr_1.20        parallel_3.4.4   
[28] class_7.3-14      Rcpp_0.12.18      backports_1.1.2  
[31] scales_1.0.0      classInt_0.1-24   digest_0.6.15    
[34] stringi_1.2.4     grid_3.4.4        rprojroot_1.3-2  
[37] cli_1.0.0         rgdal_1.3-4       here_0.1         
[40] tools_3.4.4       magrittr_1.5      lazyeval_0.2.1   
[43] tibble_1.4.2      crayon_1.3.4      whisker_0.3-2    
[46] pkgconfig_2.0.2   assertthat_0.2.0  rmarkdown_1.10   
[49] R6_2.2.2          units_0.6-0       git2r_0.21.0     
[52] compiler_3.4.4   </code></pre>
</div>

<!-- Adjust MathJax settings so that all math formulae are shown using
TeX fonts only; see
http://docs.mathjax.org/en/latest/configuration.html.  This will make
the presentation more consistent at the cost of the webpage sometimes
taking slightly longer to load. Note that this only works because the
footer is added to webpages before the MathJax javascript. -->
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    "HTML-CSS": { availableFonts: ["TeX"] }
  });
</script>

<hr>
<p>
  This reproducible <a href="http://rmarkdown.rstudio.com">R Markdown</a>
  analysis was created with
  <a href="https://github.com/jdblischak/workflowr">workflowr</a> 1.0.1
</p>
<hr>


</div>
</div>

</div>

<script>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
  $('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
  bootstrapStylePandocTables();
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>

</body>
</html>