Skip to content

Commit a5564a2

Browse files
committed
varia
1 parent 15df98e commit a5564a2

File tree

1 file changed

+44
-30
lines changed

1 file changed

+44
-30
lines changed

teach/stats/r4a/2025/index-part2.qmd

+44-30
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ format:
2929
width: 1200
3030
bibliography: references.bib
3131
pagetitle: "Report with R Markdown - part 2"
32-
footer: "Report with R Markdown - R4Rchaeologists <img src='https://raw.githubusercontent.com/zoometh/thomashuet/master/teach/www/logo.png' style='height: 35px;vertical-align: middle;'> Università di Pisa, Feb 2024 - <em>presented by </em> Thomas Huet"
32+
footer: "Report with R Markdown - R4Rchaeologists <img src='https://raw.githubusercontent.com/zoometh/thomashuet/master/teach/www/logo.png' style='height: 35px;vertical-align: middle;'> Università di Pisa, Jan 2025 - <em>presented by </em> Thomas Huet"
3333
---
3434

3535

@@ -66,26 +66,30 @@ R <span class="r-code">code chunks</span> are placeholders for the coding part o
6666

6767
### Headers options
6868

69+
Options are used to show/hide the code, change the size and set the alignment of the ouptut, etc.
70+
6971
<div class="div-code">
7072
<small>code chunk</small>
7173
```{.r }
7274
{r munsingenspat, echo = TRUE, warning = FALSE, message = FALSE}
7375
```
7476
</div>
7577

76-
Options are used to show/hide the code, change the size of the output image, set the alignment of the ouptut, etc.
7778

7879
<center>
7980

8081
![](https://raw.githubusercontent.com/zoometh/thomashuet/master/teach/www/rmd_create_rmd_new.png){width="900px"}
8182

8283
</center>
8384

84-
<small><https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2024/temp.pdf></small>
85+
<small><https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2025/temp.pdf></small>
8586

8687

8788
### Options hierarchy
8889

90+
The top chunk of the `.Rmd` file is commonly used to set global options for all subsequent chunks, unless you override these options locally within the headers of individual code chunks.
91+
92+
8993
<div class="div-code">
9094
<small>code chunk</small>
9195
```{.r }
@@ -94,8 +98,6 @@ knitr::opts_chunk$set(echo = TRUE)
9498
```
9599
</div>
96100

97-
The top chunk of the `.Rmd` file is commonly used to set global options for all subsequent chunks, unless you override these options locally within the headers of individual code chunks.
98-
99101

100102
```{=html}
101103
<script src="https://gist.github.com/zoometh/d1b4945d1c16f853a7888ede03c4807d.js"></script>
@@ -281,6 +283,8 @@ knitr::include_graphics(fibula)
281283

282284
## YAML {#yaml}
283285

286+
The <span class="r-yaml">YAML header</span> is the <span class="r-md">R Markdown</span> document header, it contains the metadata (e.g, title), the document output format (e.g, PDF) and configuration (e.g. table of content). It is composed on **key - value** pairs:
287+
284288
<div class="div-yaml">
285289
<small>header YAML</small>
286290
```{.yml}
@@ -292,8 +296,6 @@ date: '2023-02-05'
292296
```
293297
</div>
294298

295-
<span class="r-yaml">YAML header</span> is the document header, it contains the metadata (e.g, title), the document output format (e.g, PDF) and configuration (e.g. table of content). It is composed on **key - value** pairs:
296-
297299

298300
```{=html}
299301
<script src="https://gist.github.com/zoometh/d1b4945d1c16f853a7888ede03c4807d.js"></script>
@@ -336,6 +338,8 @@ Here the <notes>`</notes> quote has been changed to a <notes>'</notes> quote for
336338
\
337339

338340
## YAML output
341+
342+
<span class="r-md">R Markdown</span> output format.
339343

340344
<div class="div-yaml">
341345
<small>header YAML</small>
@@ -349,7 +353,7 @@ output:
349353
```
350354
</div>
351355

352-
Select the output format, here a PDF: <small><https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2024/temp.pdf></small>
356+
Here a PDF: <small><https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2025/temp.pdf></small>
353357

354358
```{=html}
355359
<script src="https://gist.github.com/zoometh/d1b4945d1c16f853a7888ede03c4807d.js"></script>
@@ -358,7 +362,7 @@ Select the output format, here a PDF: <small><https://github.com/zoometh/thomash
358362

359363
## YAML table of content
360364

361-
Table of content (TOC)
365+
Table of content (TOC).
362366

363367
<div class="div-yaml">
364368
<small>header YAML</small>
@@ -381,6 +385,8 @@ output:
381385

382386
## YAML references
383387

388+
Locate the bibliographic file (e.g. [`references.bib`](https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2025/references.bib)).
389+
384390
<div class="div-yaml">
385391
<small>header YAML</small>
386392
```{.yml code-line-numbers="5"}
@@ -393,7 +399,7 @@ bibliography: references.bib
393399
```
394400
</div>
395401

396-
Reference the bibliographic file (e.g. [`references.bib`](https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2024/references.bib)). Here in the same folder as the `.Rmd` file.
402+
Here in the same folder as the `.Rmd` file.
397403

398404

399405
```{=html}
@@ -515,7 +521,7 @@ Customize with CSS like this <notes>**dodgerblue** background</notes>.
515521

516522
:::
517523

518-
## HTML online editor
524+
## HTML online editor {data-visibility=hidden}
519525

520526
::: {.panel-tabset}
521527

@@ -543,7 +549,7 @@ Customize with CSS like this <notes>**dodgerblue** background</notes>.
543549

544550
### Shiny
545551

546-
<img src='https://raw.githubusercontent.com/zoometh/thomashuet/master/img/app-prg-r-pkg-shiny.png' style='height: 45px;vertical-align: middle;'> offers a framework to create interactive documents
552+
Interactivity with the <img src='https://raw.githubusercontent.com/zoometh/thomashuet/master/img/app-prg-js.png' style='height: 45px;vertical-align: middle;'> package (for the client-side) <img src='https://raw.githubusercontent.com/zoometh/thomashuet/master/img/r-pkg-shiny.png' style='height: 45px;vertical-align: middle;'>
547553

548554
<div class="div-yaml">
549555
<small>header YAML</small>
@@ -742,63 +748,71 @@ On GitHub <img src="https://raw.githubusercontent.com/zoometh/thomashuet/master/
742748
<tbody>
743749
<tr>
744750
<td>raw</td>
745-
<td><small><https://raw.githubusercontent.com/zoometh/thomashuet/main/teach/stats/r4a/2024/practice/2_Rmarkdown_Practice.Rmd></small></td>
751+
<td><small><https://raw.githubusercontent.com/zoometh/thomashuet/main/teach/stats/r4a/2025/practice/2_Rmarkdown_Practice.Rmd></small></td>
746752
</tr>
747753
<tr>
748754
<td>`.Rmd`</td>
749-
<td><small><https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2024/practice/2_Rmarkdown_Practice.Rmd></small></td>
755+
<td><small><https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2025/practice/2_Rmarkdown_Practice.Rmd></small></td>
750756
</tr>
751757
<tr>
752758
<td>PDF</td>
753-
<td><small><https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2024/practice/2_Rmarkdown_Practice.pdf></small></td>
759+
<td><small><https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2025/practice/2_Rmarkdown_Practice.pdf></small></td>
754760
</tr>
755761
</tbody>
756762
</table>
757763

764+
\
765+
\
766+
758767
:::
759768

769+
# Practice
770+
760771

761772
## Practice {#practice}
762773

763774
::: {.panel-tabset}
764775

765776
### Objective
766777

767-
::: {.callout-note}
768-
The practical part has an estimated duration of 60 minutes
769-
:::
778+
<small>
779+
780+
Use <span class="r-md">R Markdown</span> (<span class="r-code">code chunks</span> and <span class="r-text">narrative parts</span>) to create a report. Choose between:
770781

771-
Use <span class="r-md">R Markdown</span> (<span class="r-code">code chunks</span> and <span class="r-text">narrative parts</span>) to create a report. Choice between:
782+
- [ ] improve the `.Rmd` document: "Münsingen-Rain necropolis (Bern, Switzerland). A quantative study of Late Iron Age fibulae" <img src='https://raw.githubusercontent.com/zoometh/thomashuet/master/teach/www/munsingen_fib_measures.png' style='height: 65px;vertical-align: middle;'> using the dataset 'Fibulae' from {`archdata`}
772783

773-
- [ ] start from scratch ([here](https://zoometh.github.io/thomashuet/teach/stats/r4a/2024/site/index-part1#/new-document))
784+
- [ ] start from scratch ([here](https://zoometh.github.io/thomashuet/teach/stats/r4a/2025/site/index-part1#/new-document)) and select another dataset from {`archdata`} (e.g. 'Handaxes').
774785

775-
- [ ] improvement of the existing `.Rmd` model for the <img src='https://raw.githubusercontent.com/zoometh/thomashuet/master/teach/www/munsingen_fib_measures.png' style='height: 65px;vertical-align: middle;'> fibulae from the Münsingen cemetery
786+
</small>
776787

777-
- [ ] select another dataset from the {`archdata`} package (e.g. 'Handaxes'), to improve the `.Rmd` template
788+
::: {.callout-note}
789+
The practical part has an estimated duration of 60 minutes
790+
:::
778791

779792
\
780793

781-
### Data
794+
### How to start?
795+
796+
<small>Download/Copy the folder `r4a/2025/practice/` and locate the file `2_Rmarkdown_Practice.Rmd` and the .`bib` file by following this link: </small>
782797

783-
Download the folder `r4a/2024/practice/` and locate the file `2_Rmarkdown_Practice.Rmd`:
784798
```{.html}
785-
https://github.com/zoometh/thomashuet/tree/main/teach/stats/r4a/2024/practice/
799+
https://github.com/zoometh/thomashuet/tree/main/teach/stats/r4a/2025/practice/
786800
```
787801

788-
You can use this website:
802+
<small> You can also use this website to download the folder: </small>
803+
789804
```{=html}
790805
<iframe width="1000" height="200" src="https://download-directory.github.io/"></iframe>
791806
```
792807
<small><https://download-directory.github.io/></small>
793808

794-
or go here: [https://github.com/zoometh/thomashuet/blob/main/teach/stats/r4a/2024/practice/2_Rmarkdown_Practice.Rmd](https://github.com/zoometh/thomashuet/tree/main/teach/stats/r4a/2024) and download, or copy/paste this `.Rmd` file and the .`bib` file.
795-
809+
\
796810
\
797811

798812

799-
### Output
813+
### How to end?
800814

801-
Contact me, send me your `.Rmd`, connected files (e.g. `references.bib`) here 👋 online
815+
Contact me, send me your `.Rmd` and related files (e.g. `references.bib`) here online 👋
802816

803817
<center>or</center>
804818

0 commit comments

Comments
 (0)