Skip to content

Commit

Permalink
Update slides
Browse files Browse the repository at this point in the history
  • Loading branch information
relund committed Oct 8, 2024
1 parent 2d31ad1 commit ba4658a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 23 deletions.
23 changes: 7 additions & 16 deletions docs/slides/08_r-workflow-slides.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
- Define a list with a vector, a number, a string and a boolean.
]

<div class="countdown" id="timer_738f14a2" data-update-every="1" tabindex="0" style="top:0;right:0;">
<div class="countdown" id="timer_d5c27a85" data-update-every="1" tabindex="0" style="top:0;right:0;">
<div class="countdown-controls"><button class="countdown-bump-down">&minus;</button><button class="countdown-bump-up">&plus;</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">05</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand Down Expand Up @@ -263,7 +263,7 @@
- Set `lst &lt;- list(x = 3, y = "foo")` and check if `lst` contains an object `z` [use `is.null`].
]

<div class="countdown" id="timer_5ca81467" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown" id="timer_8996b5b6" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown-controls"><button class="countdown-bump-down">&minus;</button><button class="countdown-bump-up">&plus;</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">10</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand All @@ -285,12 +285,12 @@

## Pipes

Use the pipe `%&gt;%` operator for expressing a sequence of multiple operations (Ctrl+Shift+M). Value `log2(sqrt(16))` using pipes:
Use the pipe `|&gt;` operator (or `%&gt;%`) for expressing a sequence of multiple operations (Ctrl+Shift+M, Shift+Cmd+M). Value `log2(sqrt(16))` using pipes:

``` r
library(tidyverse) # define the pipe operator
x &lt;- 16
x %&gt;% sqrt() %&gt;% log2()
x |&gt; sqrt() |&gt; log2()
```

```
Expand Down Expand Up @@ -325,7 +325,7 @@
```
]

<div class="countdown" id="timer_f0d723a3" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown" id="timer_6034a093" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown-controls"><button class="countdown-bump-down">&minus;</button><button class="countdown-bump-up">&plus;</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">05</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand All @@ -334,21 +334,12 @@


``` r
x &lt;- c(1:4, NA, 34)^2 %&gt;% sum() %&gt;% sqrt() # or
x &lt;- c(1:4, NA, 34)^2 |&gt; sum(na.rm = TRUE) |&gt; sqrt() # or
x
```

```
## [1] NA
```

``` r
x &lt;- c(1:4, NA, 34) %&gt;% `^`(2) %&gt;% sum() %&gt;% sqrt()
x
```

```
## [1] NA
## [1] 34.43835
```


Expand Down
2 changes: 1 addition & 1 deletion slides/07_r-install-slides.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ knitr::include_graphics("img/R_vs_RStudio_1.png")
* Use command-line or script file.
* It will take you some time to become familiar with the interface and master the various functions.
- VBA
* Compiled language.
* A compiled programming language.
---

## Cloud vs laptop version (pros)
Expand Down
7 changes: 4 additions & 3 deletions slides/07_r-install-slides.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
* Use command-line or script file.
* It will take you some time to become familiar with the interface and master the various functions.
- VBA
* Compiled language.
* A compiled programming language.
---

## Cloud vs laptop version (pros)
Expand Down Expand Up @@ -126,7 +126,7 @@
[course-welcome-to-the-tidyverse]: https://github.com/rstudio-education/welcome-to-the-tidyverse

[DataCamp]: https://www.datacamp.com/
[datacamp-signup]: https://www.datacamp.com/groups/shared_links/7a7a4ede68772eefe3a53ce01aead09b538efdf6770fd59911afc29ae396b88e
[datacamp-signup]: https://www.datacamp.com/groups/shared_links/c90b55dfb7c72d4f8184f5e53ac5c2521e67a220a9e40778ee28178b284eef77
[datacamp-r-intro]: https://learn.datacamp.com/courses/free-introduction-to-r
[datacamp-r-rmarkdown]: https://campus.datacamp.com/courses/reporting-with-rmarkdown
[datacamp-r-communicating]: https://learn.datacamp.com/courses/communicating-with-data-in-the-tidyverse
Expand Down Expand Up @@ -166,7 +166,7 @@
[hg-credential-helper]: https://happygitwithr.com/credential-caching.html
[hypothes.is]: https://web.hypothes.is/

[osca-programme]: https://kandidat.au.dk/en/operationsandsupplychainanalytics/
[osca-programme]: https://masters.au.dk/operationsandsupplychainanalytics

[Peergrade]: https://peergrade.io
[peergrade-signup]: https://app.peergrade.io/join
Expand Down Expand Up @@ -203,6 +203,7 @@
[stat-545-functions-part1]: https://stat545.com/functions-part1.html
[stat-545-functions-part2]: https://stat545.com/functions-part2.html
[stat-545-functions-part3]: https://stat545.com/functions-part3.html
[slides]: https://bss-osca.github.io/tfa/slides/
[slides-welcome]: https://bss-osca.github.io/tfa/slides/00-tfa_welcome.html
[slides-m1-3]: https://bss-osca.github.io/tfa/slides/01-welcome_r_part.html
[slides-m4-5]: https://bss-osca.github.io/tfa/slides/02-programming.html
Expand Down
6 changes: 3 additions & 3 deletions slides/08_r-workflow-slides.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
- Define a list with a vector, a number, a string and a boolean.
]

<div class="countdown" id="timer_7c8778de" data-update-every="1" tabindex="0" style="top:0;right:0;">
<div class="countdown" id="timer_d5c27a85" data-update-every="1" tabindex="0" style="top:0;right:0;">
<div class="countdown-controls"><button class="countdown-bump-down">&minus;</button><button class="countdown-bump-up">&plus;</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">05</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand Down Expand Up @@ -263,7 +263,7 @@
- Set `lst &lt;- list(x = 3, y = "foo")` and check if `lst` contains an object `z` [use `is.null`].
]

<div class="countdown" id="timer_aae85a5f" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown" id="timer_8996b5b6" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown-controls"><button class="countdown-bump-down">&minus;</button><button class="countdown-bump-up">&plus;</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">10</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand Down Expand Up @@ -325,7 +325,7 @@
```
]

<div class="countdown" id="timer_d6050c4a" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown" id="timer_6034a093" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
<div class="countdown-controls"><button class="countdown-bump-down">&minus;</button><button class="countdown-bump-up">&plus;</button></div>
<code class="countdown-time"><span class="countdown-digits minutes">05</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>
Expand Down

0 comments on commit ba4658a

Please sign in to comment.