example of post create by the new_post function

function modified from Tom Mock

Auteur

Simon Coulombe

Date de publication

21 avril 2024

Pourquoi est-ce qu’on est ici?

First, I cross reference Figure 1 for fun.

nicer code chunks!!

pris des idées en regardant le code de ce document https://quarto.org/docs/extensions/filters.html

puis lesvrais infos sont ici (Sections appearance et filenace) https://quarto.org/docs/output-formats/html-code.html#appearance https://quarto.org/docs/output-formats/html-code.html#code-filename

not run: fenced R code block for sharing code using {{}}:

```{r}
1 + 1
```

not run: echo R code + eval = false, ça ne montre par les backticks avant et après.

<code>
1 +1 

ici je mets 4 backtics pour mettre plusieurs code chunks back to back:

---
title: "My document"
---

Some markdown content.

```{python}

1 + 1
```

Some additional markdown content.

(fin du 4 backtics ) not run: using the filename option in code chunks allows me to give a title

<code>
science.R
1+1
.bash
quarto create project <type> <name>
(a) okabe-ito color
(b) default geom color
Figure 1: mes charts

toutes les largeurs

(source: https://quarto.org/docs/authoring/article-layout.html#page-column) on peut insérer du stock avec le paramètre #| column : xxx ou bien avec les trucs funky de quarto:

:::{.column-page}
![](images/elephant.jpg)
:::

For computational output, you can specify the page column in your code cell options. For example:

<code>
```{r}
#| column: page

knitr::kable(
  mtcars[1:6, 1:10]
)
```
mpg cyl disp hp drat wt qsec vs am gear
Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4
Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4
Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4
Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3
Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3
Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3

The following code displays a Leaflet map across the whole page using the column: screen

<code>
```{r}
#| column: screen

leaflet() %>%
  addTiles() %>%  # Add default OpenStreetMap map tiles
  addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")
```

toutes les largeurs possibles :

Outset content…

page content…

page-inset content…

screen-inset content…

screen content…

margins

(source: https://quarto.org/docs/authoring/article-layout.html#margin-content)

margins figures

Figure 2: MPG vs horsepower, colored by transmission.

margins tables

mpg cyl disp
Mazda RX4 21.0 6 160
Mazda RX4 Wag 21.0 6 160
Datsun 710 22.8 4 108
Hornet 4 Drive 21.4 6 258
Hornet Sportabout 18.7 8 360
Valiant 18.1 6 225

table with figure in the output

mpg cyl disp hp drat wt
Mazda RX4 21.0 6 160 110 3.90 2.620
Mazda RX4 Wag 21.0 6 160 110 3.90 2.875
Datsun 710 22.8 4 108 93 3.85 2.320
Hornet 4 Drive 21.4 6 258 110 3.08 3.215
Hornet Sportabout 18.7 8 360 175 3.15 3.440
Valiant 18.1 6 225 105 2.76 3.460

observable js

https://quarto.org/docs/interactive/ojs/

Reproductibilité

Ce document a été généré le 28 avril 2024 à 20:51:45 . par le programme index.rmarkdown. Note: les fichiers .qmd voient leur extension remplacée par rmarkdown ici.

Local:    main C:/Users/simon/OneDrive/Documents/snippets_quarto
Remote:   main @ origin (git@github.com:SimonCoulombe/snippets_quarto.git)
Head:     [0b2dbd8] 2024-04-28: trouvé!
─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.3 (2024-02-29 ucrt)
 os       Windows 11 x64 (build 22631)
 system   x86_64, mingw32
 ui       RTerm
 language (EN)
 collate  French_Canada.utf8
 ctype    French_Canada.utf8
 tz       America/Toronto
 date     2024-04-28
 pandoc   3.1.1 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
 quarto   1.4.553 @ C:\\Users\\simon\\AppData\\Local\\Programs\\Quarto\\bin\\quarto.exe

─ Packages ───────────────────────────────────────────────────────────────────
 ! package        * version    date (UTC) lib source
 P dplyr          * 1.1.4      2023-11-17 [?] RSPM
   ggokabeito     * 0.1.0.9000 2024-04-19 [1] Github (malcolmbarrett/ggokabeito@e28e8b7)
 P ggplot2        * 3.5.0      2024-02-23 [?] RSPM
 P leaflet        * 2.2.2      2024-03-26 [?] RSPM
 P palmerpenguins * 0.1.1      2022-08-15 [?] RSPM
 P sessioninfo    * 1.2.2      2021-12-06 [?] RSPM

 [1] C:/Users/simon/OneDrive/Documents/snippets_quarto/renv/library/R-4.3/x86_64-w64-mingw32
 [2] C:/Users/simon/AppData/Local/R/cache/R/renv/sandbox/R-4.3/x86_64-w64-mingw32/7cdaab8d

 P ── Loaded and on-disk path mismatch.

──────────────────────────────────────────────────────────────────────────────

Réutilisation

Citation

BibTeX
@online{coulombe2024,
  author = {Coulombe, Simon},
  title = {example of post create by the new\_post function},
  date = {2024-04-21},
  url = {https://www.simoncoulombe.com/posts/2024-04-21-example-of-post-create-by-the-newpost-function/},
  langid = {fr}
}
Veuillez citer ce travail comme suit :
Coulombe, Simon. 2024. “example of post create by the new_post function.” April 21, 2024. https://www.simoncoulombe.com/posts/2024-04-21-example-of-post-create-by-the-newpost-function/.