Skip to content

Commit

Permalink
Merge pull request #29 from csc-training/nov2023
Browse files Browse the repository at this point in the history
Small corrections for November 2023
  • Loading branch information
helijuottonen authored Nov 27, 2023
2 parents a4aeeff + 7615be6 commit 5d8c4f2
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 37 deletions.
2 changes: 2 additions & 0 deletions docs/AdditionalResources/AdditionalResources.html
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,8 @@ <h4>2. Websites and books</h4>
<li><p><a href="https://riffomonas.org/code_club/">Riffomonas Code
Club</a> Youtube channel and R scripts. R basics and more advanced
tricks especially for microbial ecologists.</p></li>
<li><p><a href="https://swirlstats.com/">swirl</a>: an R package for
interactive self-learning within R</p></li>
</ul>
</div>
<div id="r-cheat-sheets" class="section level4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1017,10 +1017,10 @@ <h4><strong>Block 4: counting</strong></h4>
<code>plot_type</code> surveyed?</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>surveys <span class="sc">|&gt;</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">count</span>(plot_type)</span></code></pre></div>
<p><strong>4.2</strong> Use <code>group_by()</code> and
<code>summarize()</code> to find the mean, minimum and maximum hindfoot
length for each species (using <code>species_id</code>). Also try adding
the number of observations (hint: use <code>n</code>).</p>
<p><strong>4.2</strong> Use <code>summarize()</code> <code>.by</code> to
find the mean, minimum and maximum hindfoot length for each species
(using <code>species_id</code>). Also try adding the number of
observations (hint: use <code>n</code>).</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>surveys <span class="sc">|&gt;</span></span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">filter</span>(<span class="sc">!</span><span class="fu">is.na</span>(hindfoot_length)) <span class="sc">|&gt;</span></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">summarize</span>(</span>
Expand All @@ -1038,7 +1038,7 @@ <h4><strong>Block 4: counting</strong></h4>
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a>surveys <span class="sc">|&gt;</span></span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">filter</span>(<span class="sc">!</span><span class="fu">is.na</span>(weight)) <span class="sc">|&gt;</span></span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">filter</span>(weight <span class="sc">==</span> <span class="fu">max</span>(weight), <span class="at">.by =</span> year) <span class="sc">|&gt;</span></span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">select</span>(year, genus, species, weight) <span class="sc">|&gt;</span></span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">select</span>(year, genus, species_id, weight) <span class="sc">|&gt;</span></span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">arrange</span>(year)</span></code></pre></div>
</div>
<div id="block-5-pivoting" class="section level4">
Expand Down
40 changes: 11 additions & 29 deletions docs/Schedule/Schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@



<title>Schedule_remote.knit</title>
<title>Schedule.knit</title>

<script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
Expand Down Expand Up @@ -845,50 +845,32 @@
<h1>Course schedule</h1>
<div id="day-1" class="section level4">
<h4><strong>Day 1</strong></h4>
<p><strong>09:00 - 14:30</strong></p>
<p>Hands-on teaching via Zoom</p>
<p><strong>09:00 - 16:00</strong></p>
<ul>
<li>Introduction</li>
<li>Basic features of R</li>
<li>Starting with data<br />
</li>
<li>Data manipulation (introduction)</li>
</ul>
<p><strong>14:30 onward</strong></p>
<p>Independent exercises</p>
<ul>
<li>Data manipulation (continued)</li>
<li>Data manipulation</li>
<li>Feedback</li>
</ul>
</div>
<div id="day-2" class="section level4">
<h4><strong>Day 2</strong></h4>
<p><strong>09:00 - 14:30</strong></p>
<p>Hands-on teaching via Zoom</p>
<ul>
<li>Feedback and solutions to independent exercises</li>
<li>Data visualization (introduction)</li>
</ul>
<p><strong>14:30 onward</strong></p>
<p>Independent exercises</p>
<p><strong>09:00 - 16:00</strong></p>
<ul>
<li>Data visualization (continued)</li>
</ul>
</div>
<div id="day-3" class="section level4">
<h4><strong>Day 3</strong></h4>
<p>Note: Only for the three-day variant of the course</p>
<p><strong>09:00 - 14:30</strong></p>
<p>Hands-on teaching via Zoom</p>
<ul>
<li>Feedback and solutions to independent exercises</li>
<li>Statistical theory (short lecture)</li>
<li>Data manipulation (continued)</li>
<li>Data visualization</li>
<li>Introduction to statistical testing in R</li>
<li>Feedback</li>
</ul>
</div>
<div id="breaks" class="section level4">
<h4><strong>Breaks</strong></h4>
<ul>
<li>10:30 - 10:45 (short coffee break)</li>
<li>10:30 - 10:50 (morning coffee break)</li>
<li>12:00 - 13:00 (lunch)</li>
<li>14:10-14:30 (afternoon coffee break)</li>
</ul>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion eLena_md/AdditionalResources/AdditionalResources.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ There are lots of great books, websites and online tutorials for learning more a

- [Riffomonas Code Club](https://riffomonas.org/code_club/) Youtube channel and R scripts. R basics and more advanced tricks especially for microbial ecologists.

- [swirl](https://swirlstats.com/): an R package for interactive self-learning within R

#### 3. R cheat sheets

Cheat sheets are handy collections of commands and options on a specific package or a topic. Here are some examples:
Expand All @@ -56,7 +58,6 @@ Cheat sheets are handy collections of commands and options on a specific package
- [data manipulation with `dplyr`](https://github.com/rstudio/cheatsheets/raw/main/data-transformation.pdf)
- [data tidying with `tidyr`](https://github.com/rstudio/cheatsheets/raw/main/tidyr.pdf)


#### 4. Using R on CSC's supercomputers

If get to the point that your R scripts are too computationally heavy to run on your own computer, it might be time to look for extra resources. R is available on CSC's supercomputer Puhti. Like many CSC's services, Puhti is free to use if you are affiliated with a Finnish higher education institution or a state research institute. An introduction to using R in CSC's services is available as [slides here](https://a3s.fi/heli-slides/User_zoom_Rintro_23112022.pdf) and [as a talk here](https://video.csc.fi/media/t/0_t0pp68xr?pk_vid=86530b39c9d332d516753361092bbf0f), and further instructions on using the Puhti R environment can be found [here](https://docs.csc.fi/apps/r-env/).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ surveys |>
count(plot_type)
```

**4.2** Use `group_by()` and `summarize()` to find the mean, minimum and maximum hindfoot length for each species (using `species_id`). Also try adding the number of observations (hint: use `n`).
**4.2** Use `summarize()` `.by` to find the mean, minimum and maximum hindfoot length for each species (using `species_id`). Also try adding the number of observations (hint: use `n`).

```r
surveys |>
Expand All @@ -164,7 +164,7 @@ also with some dplyr functions that `summarize`.
surveys |>
filter(!is.na(weight)) |>
filter(weight == max(weight), .by = year) |>
select(year, genus, species, weight) |>
select(year, genus, species_id, weight) |>
arrange(year)
```

Expand Down

0 comments on commit 5d8c4f2

Please sign in to comment.