Skip to content

Commit

Permalink
update slides
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-arino committed Mar 24, 2024
1 parent 5a23e7e commit 84a6758
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 27 deletions.
25 changes: 21 additions & 4 deletions SLIDES/vignette-01-introduction-installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -455,23 +455,33 @@ <h2><span class="r-fit-text">R uses a lot of code from other languages</span></h
<h2>Lots of people use R</h2>
<ul>
<li>Very active community on the web, easy to find solutions (same true of Python, I just prefer R)</li>
</ul>
<p><br></p>
<ul>
<li>E.g., on Stack Overflow, <a href="https://stackoverflow.com/questions/tagged/r">questions tagged [r]</a> gives (2024-03) 505,118</li>
</ul>
<p><br></p>
<ul>
<li>This also means that ChatGPT or Google Gemini are quite good at answering questions about R</li>
</ul>
</section>
<section id="r-is-a-scripted-language" class="slide level2">
<h2>R is a scripted language</h2>
<ul>
<li>Interactive</li>
</ul>
<p><br></p>
<ul>
<li>Allows you to work in real time
<ul>
<li>Be careful: what is in memory might involve steps not written down in a script</li>
<li>If you want to reproduce your steps, it is good to write all the steps down in a script and to test from time to time running using <code>Rscript</code>: this will ensure that all that is required to run is indeed loaded to memory when it needs to, i.e., that it is not already there..</li>
<li>If you want to reproduce your steps, it is good to write all the steps down in a script and to test from time to time using the command line; see <a href="https://julien-arino.github.io/R-for-modellers/SLIDES/vignette-22-R-command-line.html">Vignette 22</a></li>
</ul></li>
</ul>
</section>
<section id="similar-to-matlab-and-python.." class="slide level2">
<h2>Similar to matlab and Python..</h2>
<p><br></p>
<p>.. with some differences, of course! Otherwise, where would the fun be? ;)</p>
</section></section>
<section>
Expand All @@ -482,14 +492,21 @@ <h1>Installing R</h1>
<section id="the-main-location---cran" class="slide level2">
<h2>The main location - CRAN</h2>
<ul>
<li><p>The <a href="https://cran.r-project.org/">Comprehensive R Archive Network</a> or CRAN is where to go for all official things R</p></li>
<li><p>To install, select your OS from the main page</p></li>
<li>The <a href="https://cran.r-project.org/">Comprehensive R Archive Network</a> or CRAN is where to go for all official things R</li>
</ul>
<p><br></p>
<ul>
<li>To install, select your OS from the main page</li>
</ul>
</section>
<section id="a-note-for-linux-users" class="slide level2">
<h2>A note for Linux users</h2>
<p><br></p>
<ul>
<li>Often, the version on your distribution is not the most up to date</li>
</ul>
<p><br></p>
<ul>
<li><p>Often, the version on your distribution is not the most up to date</p></li>
<li><p>Instructions are on CRAN about setting things up so you have the latest version. For instance,</p>
<ul>
<li><a href="https://cran.r-project.org/bin/linux/debian/#secure-apt">Debian</a></li>
Expand Down
19 changes: 18 additions & 1 deletion SLIDES/vignette-01-introduction-installation.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,29 @@ tail(rversions::r_versions(), n = 8)
## Lots of people use R

- Very active community on the web, easy to find solutions (same true of Python, I just prefer R)

<br>

- E.g., on Stack Overflow, [questions tagged [r]](https://stackoverflow.com/questions/tagged/r) gives (2024-03) 505,118

<br>

- This also means that ChatGPT or Google Gemini are quite good at answering questions about R

## R is a scripted language

- Interactive

<br>

- Allows you to work in real time
- Be careful: what is in memory might involve steps not written down in a script
- If you want to reproduce your steps, it is good to write all the steps down in a script and to test from time to time running using `Rscript`: this will ensure that all that is required to run is indeed loaded to memory when it needs to, i.e., that it is not already there..
- If you want to reproduce your steps, it is good to write all the steps down in a script and to test from time to time using the command line; see [Vignette 22](https://julien-arino.github.io/R-for-modellers/SLIDES/vignette-22-R-command-line.html)

## Similar to matlab and Python..

<br>

.. with some differences, of course! Otherwise, where would the fun be? ;)

# Installing R
Expand All @@ -70,12 +81,18 @@ tail(rversions::r_versions(), n = 8)

- The [Comprehensive R Archive Network](https://cran.r-project.org/) or CRAN is where to go for all official things R

<br>

- To install, select your OS from the main page

## A note for Linux users

<br>

- Often, the version on your distribution is not the most up to date

<br>

- Instructions are on CRAN about setting things up so you have the latest version. For instance,

- [Debian](https://cran.r-project.org/bin/linux/debian/#secure-apt)
Expand Down
31 changes: 28 additions & 3 deletions SLIDES/vignette-02-Rstudio-and-friends.html
Original file line number Diff line number Diff line change
Expand Up @@ -362,15 +362,19 @@ <h1>Posit</h1>
<li><p><a href="https://posit.co/">Posit</a> was formerly called <code>RStudio</code>, like their main product</p></li>
<li><p>Did a lot of development for <code>R</code>, still do even on the open source side of things</p></li>
<li><p>For-profit company, sells “pro” versions of its open source products</p></li>
<li><p>IMOBO: in the process of moving to the “dark side”, trying to ram “pro” versions down your throat</p></li>
<li><p>IMOBO: in the process of moving to the “dark side”</p></li>
<li><p>You can completely exist without using the pro versions, though, don’t worry!</p></li>
</ul>
</section>

<section id="rstudio" class="title-slide slide level1 center">
<h1>RStudio</h1>
<p><br></p>
<ul>
<li><a href="https://posit.co/products/open-source/rstudio/">RStudio</a> has become the reference IDE for R</li>
</ul>
<p><br></p>
<ul>
<li><a href="https://posit.co/download/rstudio-desktop/">Download link</a></li>
</ul>
</section>
Expand All @@ -379,7 +383,13 @@ <h1>RStudio</h1>
<h1>RStudio server</h1>
<ul>
<li><a href="https://posit.co/products/open-source/rstudio-server/">RStudio server</a>: run RStudio on a Linux server and connect via a web interface</li>
</ul>
<p><br></p>
<ul>
<li><a href="https://posit.co/download/rstudio-server/">Download link</a></li>
</ul>
<p><br></p>
<ul>
<li>Note that as far as I can tell, there is no mechanism to auto-update RStudio-server, so you will have to program something or check the site regularly..</li>
</ul>
</section>
Expand All @@ -388,7 +398,13 @@ <h1>RStudio server</h1>
<h1>RMarkdown</h1>
<ul>
<li>Rmarkdown: markdown that incorporates R commands</li>
</ul>
<p><br></p>
<ul>
<li>Useful for generating reports in html, pdf or doc, can make slides as well..</li>
</ul>
<p><br></p>
<ul>
<li>See <a href="https://julien-arino.github.io/R-for-modellers/SLIDES/vignette-13-RMarkdown.html">Vignette 13</a></li>
</ul>
</section>
Expand All @@ -408,16 +424,25 @@ <h1>Sweave</h1>
<h1>Quarto</h1>
<ul>
<li>Promoted as next-gen version of Sweave/RMarkdown</li>
<li>Will confess that I have not yet seen why switch in the general case</li>
</ul>
<p><br></p>
<ul>
<li>These Vignettes are created using Quarto and reveal.js</li>
</ul>
<p><br></p>
<ul>
<li>See <a href="https://julien-arino.github.io/R-for-modellers/SLIDES/vignette-15-Quarto.html">Vignette 15</a></li>
</ul>
</section>

<section id="shiny" class="title-slide slide level1 center">
<h1>Shiny</h1>
<p><br></p>
<ul>
<li>Shiny: easily create an <em>interactive</em> web page running R code</li>
</ul>
<p><br></p>
<ul>
<li>Shiny: easily create an interactive web site running R code</li>
<li>See <a href="https://julien-arino.github.io/R-for-modellers/SLIDES/vignette-16-Shiny.html">Vignette 16</a></li>
</ul>
</section>
Expand Down
33 changes: 30 additions & 3 deletions SLIDES/vignette-02-Rstudio-and-friends.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,42 @@ format:

- For-profit company, sells "pro" versions of its open source products

- IMOBO: in the process of moving to the "dark side", trying to ram "pro" versions down your throat
- IMOBO: in the process of moving to the "dark side"

- You can completely exist without using the pro versions, though, don't worry!

# RStudio

<br>

- [RStudio](https://posit.co/products/open-source/rstudio/) has become the reference IDE for R

<br>

- [Download link](https://posit.co/download/rstudio-desktop/)

# RStudio server

- [RStudio server](https://posit.co/products/open-source/rstudio-server/): run RStudio on a Linux server and connect via a web interface

<br>

- [Download link](https://posit.co/download/rstudio-server/)

<br>

- Note that as far as I can tell, there is no mechanism to auto-update RStudio-server, so you will have to program something or check the site regularly..

# RMarkdown

- Rmarkdown: markdown that incorporates R commands

<br>

- Useful for generating reports in html, pdf or doc, can make slides as well..

<br>

- See [Vignette 13](https://julien-arino.github.io/R-for-modellers/SLIDES/vignette-13-RMarkdown.html)

# Sweave
Expand All @@ -60,13 +77,23 @@ format:
# Quarto

- Promoted as next-gen version of Sweave/RMarkdown
- Will confess that I have not yet seen why switch in the general case

<br>

- These Vignettes are created using Quarto and reveal.js

<br>

- See [Vignette 15](https://julien-arino.github.io/R-for-modellers/SLIDES/vignette-15-Quarto.html)

# Shiny

- Shiny: easily create an interactive web site running R code
<br>

- Shiny: easily create an *interactive* web page running R code

<br>

- See [Vignette 16](https://julien-arino.github.io/R-for-modellers/SLIDES/vignette-16-Shiny.html)

# Shiny server
Expand Down
Loading

0 comments on commit 84a6758

Please sign in to comment.