Skip to content

Commit

Permalink
update FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
alexd106 committed Dec 8, 2023
1 parent 058fc39 commit 5da9a23
Show file tree
Hide file tree
Showing 25 changed files with 983 additions and 154 deletions.
4 changes: 2 additions & 2 deletions FAQ.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See the course [syllabus](syllabus.html) for a general outline of the course con
\

#### Where is the course held?
This course will be run entirely online this year. All interactive live sessions will be run using Blackboard Collaborate via [MyAberdeen](https://abdn.blackboard.com/). During these live sessions you will all be working in the main meeting room as you work through the associated course exercises. If you have a question, or get stuck you'll be able to get 1:1 support from one of the course instructors in a smaller breakout group. More information about this setup will be provided during the first session on Monday 12^th^ December 2022.
This course will be run entirely online this year. All interactive live sessions will be run using Blackboard Collaborate via [MyAberdeen](https://abdn.blackboard.com/). During these live sessions you will all be working in the main meeting room as you work through the associated course exercises. If you have a question, or get stuck you'll be able to get 1:1 support from one of the course instructors in a smaller breakout group. More information about this setup will be provided during our first session together.

<!--
will be teaching will be held in room FN113 in the Fraser Noble building (building No. 7 on [this map](images/uoa_map.png) on the old Aberdeen campus). For those of you unfamiliar with the Aberdeen campus I have also indicated on the map where you can grab a bite to eat or a caffeine hit!
Expand All @@ -37,7 +37,7 @@ will be teaching will be held in room FN113 in the Fraser Noble building (buildi
No. We will provide desktop computers for those who do not wish to bring their own laptops to the course. All of the desktops will have both R and RStudio already installed but please bring along a USB flash drive to save your work. If you require a desktop computer then please make sure you have registered for a UoA visitor computing account prior to the start of the course (contact [Izzie Buchanan](People.html) for further details). Having said that, if you have a laptop (Mac or Windows) we encourage you to bring it to the course. Please take a look at the **[Setup<i class="fa fa-cog" aria-hidden="true"></i>](setup.html)** link on the navbar at the top for further instructions on how to set up your laptop prior to the course starting.
-->

Yes. As we'll be running the course online this year you'll need your own computer with internet access. Please take a look at the **[Setup<i class="fa fa-cog" aria-hidden="true"></i>](setup.html)** link on the navbar at the top for further instructions on how to set up your computer prior to the course starting. Don't worry, you don't need a particularly powerful computer to install R and RStudio so anything from the last 5 years or so should be fine. What you will need is a reasonably stable internet connection to participate in the live Blackboard Collaborate sessions. If you think that your internet connection may not be up to it then please contact [Izzie](People.html) to discuss alternatives.
Yes. As we'll be running the course online you'll need your own computer with internet access. Please take a look at the **[Setup<i class="fa fa-cog" aria-hidden="true"></i>](setup.html)** link on the navbar at the top for further instructions on how to set up your computer prior to the course starting. Don't worry, you don't need a particularly powerful computer to install R and RStudio so anything from the last 5 years or so should be fine. What you will need is a reasonably stable internet connection to participate in the live Blackboard Collaborate sessions. If you think that your internet connection may not be up to it then please [contact us](People.html) to discuss alternatives.

\

Expand Down
11 changes: 5 additions & 6 deletions FAQ.html
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,7 @@ <h4>Where is the course held?</h4>
through the associated course exercises. If you have a question, or get
stuck you’ll be able to get 1:1 support from one of the course
instructors in a smaller breakout group. More information about this
setup will be provided during the first session on Monday
12<sup>th</sup> December 2022.</p>
setup will be provided during our first session together.</p>
<!--
will be teaching will be held in room FN113 in the Fraser Noble building (building No. 7 on [this map](images/uoa_map.png) on the old Aberdeen campus). For those of you unfamiliar with the Aberdeen campus I have also indicated on the map where you can grab a bite to eat or a caffeine hit!
-->
Expand All @@ -523,17 +522,17 @@ <h4>Do I need my own computer?</h4>
<!--
No. We will provide desktop computers for those who do not wish to bring their own laptops to the course. All of the desktops will have both R and RStudio already installed but please bring along a USB flash drive to save your work. If you require a desktop computer then please make sure you have registered for a UoA visitor computing account prior to the start of the course (contact [Izzie Buchanan](People.html) for further details). Having said that, if you have a laptop (Mac or Windows) we encourage you to bring it to the course. Please take a look at the **[Setup<i class="fa fa-cog" aria-hidden="true"></i>](setup.html)** link on the navbar at the top for further instructions on how to set up your laptop prior to the course starting.
-->
<p>Yes. As we’ll be running the course online this year you’ll need your
own computer with internet access. Please take a look at the <strong><a
<p>Yes. As we’ll be running the course online you’ll need your own
computer with internet access. Please take a look at the <strong><a
href="setup.html">Setup<i class="fa fa-cog" aria-hidden="true"></i></a></strong>
link on the navbar at the top for further instructions on how to set up
your computer prior to the course starting. Don’t worry, you don’t need
a particularly powerful computer to install R and RStudio so anything
from the last 5 years or so should be fine. What you will need is a
reasonably stable internet connection to participate in the live
Blackboard Collaborate sessions. If you think that your internet
connection may not be up to it then please contact <a
href="People.html">Izzie</a> to discuss alternatives.</p>
connection may not be up to it then please <a href="People.html">contact
us</a> to discuss alternatives.</p>
<p> </p>
</div>
<div id="why-are-you-not-teaching-us-tidyverse" class="section level4">
Expand Down
2 changes: 2 additions & 0 deletions Rmarkdown_intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
<script src="site_libs/navigation-1.1/codefolding.js"></script>
<script src="site_libs/kePrint-0.0.1/kePrint.js"></script>
<link href="site_libs/lightable-0.0.1/lightable.css" rel="stylesheet" />
<link href="site_libs/bsTable-3.3.7/bootstrapTable.min.css" rel="stylesheet" />
<script src="site_libs/bsTable-3.3.7/bootstrapTable.js"></script>
<link href="site_libs/font-awesome-6.4.2/css/all.min.css" rel="stylesheet" />
<link href="site_libs/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet" />
<!-- Global site tag (gtag.js) - Google Analytics -->
Expand Down
28 changes: 16 additions & 12 deletions exercise_3_solution.html
Original file line number Diff line number Diff line change
Expand Up @@ -765,16 +765,18 @@ <h2>Exercise 3: Importing and manipulating dataframes</h2>
<span id="cb5-8"><a href="#cb5-8" tabindex="-1"></a></span>
<span id="cb5-9"><a href="#cb5-9" tabindex="-1"></a>whale.subset <span class="ot">&lt;-</span> whale[whale<span class="sc">$</span>month <span class="sc">==</span> <span class="st">&quot;October&quot;</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>water.noise <span class="sc">==</span> <span class="st">&quot;low&quot;</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>gradient <span class="sc">&gt;</span> <span class="dv">132</span>, ]</span>
<span id="cb5-10"><a href="#cb5-10" tabindex="-1"></a></span>
<span id="cb5-11"><a href="#cb5-11" tabindex="-1"></a>whale.lat.long <span class="ot">&lt;-</span> whale[whale<span class="sc">$</span>latitude <span class="sc">&gt;</span> <span class="dv">60</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>latitude <span class="sc">&lt;</span> <span class="dv">61</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>longitude <span class="sc">&gt;</span> <span class="sc">-</span><span class="dv">6</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>longitude <span class="sc">&lt;</span> <span class="sc">-</span><span class="dv">4</span>, ]</span>
<span id="cb5-12"><a href="#cb5-12" tabindex="-1"></a></span>
<span id="cb5-13"><a href="#cb5-13" tabindex="-1"></a>whale.nomed <span class="ot">&lt;-</span> whale[whale<span class="sc">$</span>water.noise <span class="sc">!=</span> <span class="st">&quot;medium&quot;</span>, ]</span></code></pre></div>
<span id="cb5-11"><a href="#cb5-11" tabindex="-1"></a>whale.lat.long <span class="ot">&lt;-</span> whale[whale<span class="sc">$</span>latitude <span class="sc">&gt;</span> <span class="dv">60</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>latitude <span class="sc">&lt;</span> <span class="dv">61</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>longitude <span class="sc">&gt;</span> <span class="sc">-</span><span class="dv">6</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>longitude <span class="sc">&lt;</span></span>
<span id="cb5-12"><a href="#cb5-12" tabindex="-1"></a> <span class="sc">-</span><span class="dv">4</span>, ]</span>
<span id="cb5-13"><a href="#cb5-13" tabindex="-1"></a></span>
<span id="cb5-14"><a href="#cb5-14" tabindex="-1"></a>whale.nomed <span class="ot">&lt;-</span> whale[whale<span class="sc">$</span>water.noise <span class="sc">!=</span> <span class="st">&quot;medium&quot;</span>, ]</span></code></pre></div>
<p> </p>
<p>10. A really neat feature of extracting rows based on conditional
statements is that you can include R functions within the statement
itself. To practice this, modify your answer to the gradient question in
Q9e to use the <code>median()</code> function rather than hard coding
the value 132.</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" tabindex="-1"></a>whale.subset <span class="ot">&lt;-</span> whale[whale<span class="sc">$</span>month <span class="sc">==</span> <span class="st">&quot;October&quot;</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>water.noise <span class="sc">==</span> <span class="st">&quot;low&quot;</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>gradient <span class="sc">&gt;</span> <span class="fu">median</span>(whale<span class="sc">$</span>gradient), ]</span></code></pre></div>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" tabindex="-1"></a>whale.subset <span class="ot">&lt;-</span> whale[whale<span class="sc">$</span>month <span class="sc">==</span> <span class="st">&quot;October&quot;</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>water.noise <span class="sc">==</span> <span class="st">&quot;low&quot;</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>gradient <span class="sc">&gt;</span> <span class="fu">median</span>(whale<span class="sc">$</span>gradient),</span>
<span id="cb6-2"><a href="#cb6-2" tabindex="-1"></a> ]</span></code></pre></div>
<p> </p>
<p>11. However, when using functions in conditional statements you need
to be careful. For example, write some code to extract all rows from the
Expand All @@ -786,8 +788,9 @@ <h2>Exercise 3: Importing and manipulating dataframes</h2>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1" tabindex="-1"></a><span class="co"># results in a dataframe filled with NAs.</span></span>
<span id="cb7-2"><a href="#cb7-2" tabindex="-1"></a>whale.new <span class="ot">&lt;-</span> whale[whale<span class="sc">$</span>depth <span class="sc">&gt;</span> <span class="dv">1500</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>number.whales <span class="sc">&gt;</span> <span class="fu">mean</span>(whale<span class="sc">$</span>number.whales), ]</span>
<span id="cb7-3"><a href="#cb7-3" tabindex="-1"></a></span>
<span id="cb7-4"><a href="#cb7-4" tabindex="-1"></a><span class="co"># the variable number.whales contains 1 NA value. By default the mean function will return an NA. use the na.rm argument to ignore NAs</span></span>
<span id="cb7-5"><a href="#cb7-5" tabindex="-1"></a>whale.new <span class="ot">&lt;-</span> whale[whale<span class="sc">$</span>depth <span class="sc">&gt;</span> <span class="dv">1500</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>number.whales <span class="sc">&gt;</span> <span class="fu">mean</span>(whale<span class="sc">$</span>number.whales, <span class="at">na.rm =</span> <span class="cn">TRUE</span>), ]</span></code></pre></div>
<span id="cb7-4"><a href="#cb7-4" tabindex="-1"></a><span class="co"># the variable number.whales contains 1 NA value. By default the mean function will return an NA. use</span></span>
<span id="cb7-5"><a href="#cb7-5" tabindex="-1"></a><span class="co"># the na.rm argument to ignore NAs</span></span>
<span id="cb7-6"><a href="#cb7-6" tabindex="-1"></a>whale.new <span class="ot">&lt;-</span> whale[whale<span class="sc">$</span>depth <span class="sc">&gt;</span> <span class="dv">1500</span> <span class="sc">&amp;</span> whale<span class="sc">$</span>number.whales <span class="sc">&gt;</span> <span class="fu">mean</span>(whale<span class="sc">$</span>number.whales, <span class="at">na.rm =</span> <span class="cn">TRUE</span>), ]</span></code></pre></div>
<p> </p>
<p>12. Although you have concentrated on using the square bracket
<code>[ ]</code> notation to extract rows and columns from your
Expand Down Expand Up @@ -869,12 +872,13 @@ <h2>Exercise 3: Importing and manipulating dataframes</h2>
rather than the default of 3 decimal places.</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb13-1"><a href="#cb13-1" tabindex="-1"></a><span class="fu">aggregate</span>(whale[, <span class="fu">c</span>(<span class="dv">2</span>, <span class="dv">4</span>, <span class="dv">7</span>, <span class="dv">8</span>)], <span class="at">by =</span> <span class="fu">list</span>(<span class="at">water.noise =</span> whale<span class="sc">$</span>water.noise), mean, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span>
<span id="cb13-2"><a href="#cb13-2" tabindex="-1"></a></span>
<span id="cb13-3"><a href="#cb13-3" tabindex="-1"></a><span class="fu">aggregate</span>(whale[, <span class="fu">c</span>(<span class="dv">2</span>, <span class="dv">4</span>, <span class="dv">7</span>, <span class="dv">8</span>)], <span class="at">by =</span> <span class="fu">list</span>(<span class="at">water.noise =</span> whale<span class="sc">$</span>water.noise, <span class="at">month =</span> whale<span class="sc">$</span>month), mean, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span>
<span id="cb13-4"><a href="#cb13-4" tabindex="-1"></a></span>
<span id="cb13-5"><a href="#cb13-5" tabindex="-1"></a><span class="co"># optional question. Need to specify a function &#39;on the fly&#39; using function(x){}</span></span>
<span id="cb13-6"><a href="#cb13-6" tabindex="-1"></a><span class="fu">aggregate</span>(whale[, <span class="fu">c</span>(<span class="dv">2</span>, <span class="dv">4</span>, <span class="dv">7</span>, <span class="dv">8</span>)], <span class="at">by =</span> <span class="fu">list</span>(<span class="at">water.noise =</span> whale<span class="sc">$</span>water.noise, <span class="at">month =</span> whale<span class="sc">$</span>month), <span class="cf">function</span>(x) {</span>
<span id="cb13-7"><a href="#cb13-7" tabindex="-1"></a> <span class="fu">round</span>(<span class="fu">mean</span>(x, <span class="at">na.rm =</span> <span class="cn">TRUE</span>), <span class="at">digits =</span> <span class="dv">2</span>)</span>
<span id="cb13-8"><a href="#cb13-8" tabindex="-1"></a>})</span></code></pre></div>
<span id="cb13-3"><a href="#cb13-3" tabindex="-1"></a><span class="fu">aggregate</span>(whale[, <span class="fu">c</span>(<span class="dv">2</span>, <span class="dv">4</span>, <span class="dv">7</span>, <span class="dv">8</span>)], <span class="at">by =</span> <span class="fu">list</span>(<span class="at">water.noise =</span> whale<span class="sc">$</span>water.noise, <span class="at">month =</span> whale<span class="sc">$</span>month), mean,</span>
<span id="cb13-4"><a href="#cb13-4" tabindex="-1"></a> <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span>
<span id="cb13-5"><a href="#cb13-5" tabindex="-1"></a></span>
<span id="cb13-6"><a href="#cb13-6" tabindex="-1"></a><span class="co"># optional question. Need to specify a function &#39;on the fly&#39; using function(x){}</span></span>
<span id="cb13-7"><a href="#cb13-7" tabindex="-1"></a><span class="fu">aggregate</span>(whale[, <span class="fu">c</span>(<span class="dv">2</span>, <span class="dv">4</span>, <span class="dv">7</span>, <span class="dv">8</span>)], <span class="at">by =</span> <span class="fu">list</span>(<span class="at">water.noise =</span> whale<span class="sc">$</span>water.noise, <span class="at">month =</span> whale<span class="sc">$</span>month), <span class="cf">function</span>(x) {</span>
<span id="cb13-8"><a href="#cb13-8" tabindex="-1"></a> <span class="fu">round</span>(<span class="fu">mean</span>(x, <span class="at">na.rm =</span> <span class="cn">TRUE</span>), <span class="at">digits =</span> <span class="dv">2</span>)</span>
<span id="cb13-9"><a href="#cb13-9" tabindex="-1"></a>})</span></code></pre></div>
<p> </p>
<p>17. Knowing how many observations are present for each factor level
(or combinations of factor levels) is useful to determine whether you
Expand Down
Loading

0 comments on commit 5da9a23

Please sign in to comment.