class: center, middle, inverse, title-slide .title[ # Using
with
] .author[ ### Maxime Jaunatre ] .institute[ ### LESSEM | INRAE ] .date[ ### 2022-12-01 (updated: 2023-04-27) ] --- exclude: true class: inverse, center, middle # Introduction --- exclude: true # Using git in R **Abstract :** Git is a version control system independent from R, it provides a neat way to stop the spread of old scripts sent by e-mail, enhances scientific reproducibility and provides a framework to collaborate on writing code with other people. This software can be used by every R-User, within Rstudio or using a command line tool, at any step of a project or package development. This session will present the core principles when managing code files with Git, and why it may save you time when working in a team. At the end of this session you will be able to use Git for saving your work and share it easily online on GitHub/GitLab. This may even be your first step in understanding how to contribute to your most loved open-source package on GitHub/GitLab. --- background-image: url(./CSU_RepRo_files/figure-html/phd101212s.png) background-size: contain # Why do we need a CVS ? ??? CVS control version system The production of R code is incremental in nature and requires the accumulation of different versions. It quickly becomes complicated to find your way around. --- exclude:true # Why do we need a CVS ? Est-ce que vous avez déjà : - **Fait un changement de code et voulu revenir en arrière ?** - **Perdu du code ou une sauvegarde trop ancienne ?** - Voulu voir la difference entre 2 versions ? - Voulu vérifier l'historique d'un script ? - **Voulu travailler sur un script a plusieurs ?** - **Voulu partager votre code à quelqu'un ?** - Voulu tester une nouveauté sans modifier du code déjà utile ? Si oui, et dans plein de cas, un système de version control aurait pu vous simplifier la vie. ??? Diapo dite à l'orale avec le comic suivant. --- # Why do we need a CVS ? <img src="Tuto_git_files/figure-html/unnamed-chunk-2-1.png" style="display: block; margin: auto;" /> ??? Comparison between a "classic" history and a history with git. The file name is not modified anymore and is therefore easier to find. --- # Keeping a history with Git ## What is a commit ? We have seen that it is a snapshot, but it contains more meta-data! .pull-left[ - List of edited files - Differences of edited lines - Previous commit (parent) ] .pull-right[ - Author and email - Date - Message ] ??? Git saves only different lines so it's useful for versioning a bit raw files, like code, csv or svg. Images change each time (like pdfs !) Previous commit -> notion of tree and history ! -- And a HASH (or SHA) (unique identifier) **<u>a64bc14</u>da18e47629e62b8e54d33d429c4b824e0** The underlined part is usually sufficient. --- # Keeping a history with Git ## Anatomy of a commit : git log You can find the log of all the history like that in the terminal. ```bash $ git log ``` Example : ```bash commit f36044df028b44352c293bafb0d6016b666c09c0 Author: Maxime <myveryownmail@mail.com> Date: Sun Nov 21 22:30:43 2021 +0100 Time of deco stop near MN90 values Values are very close to MN90 tables, error should be due to different number and half life of compartments. Require to think how to set this in nice function so we can use them to plan dives but also represent saturations in later graphs ! ``` --- # Keeping a history with Git <img src="CSU_RepRo_files/figure-html/commit_mess.png" width="85%" style="display: block; margin: auto;" /> .footnote[ xkcd comics, [CC BY-NC 2.5 license](https://xkcd.com/license.html) ] ??? On the usefulness of putting a comment that makes sense. --- # Repository A repository is the **folder** in which git is used and the sum of all files tracked. All git information is in **.git** and it's better to not touch it. We just need to say to git : start tracking this file now with the keyword **ADD** <img src="Tuto_git_files/figure-html/pull_push_diag-1.png" style="display: block; margin: auto;" /> ### .gitignore File to list all sensible files that we **don't** want to save. Like *data/* or temporary files *rmd.log*, *.Rhistory* etc... --- exclude: true class: inverse, center, middle # Introduction --- exclude: true # Utilisation de Git dans un travail avec R **Résumé :** --- class: inverse, center, middle # Remote repository : Github --- # Working with others <img src="Tuto_git_files/figure-html/bordel-1.png" style="display: block; margin: auto;" /> It becomes complex very quickly... 12 versions of a single file? --- # Using a remote repository Git is installed on your computer, and a repository in your folder. Principle of **Cloud** : installation of Git on a server and copy of the repository. Several hosters exist: **Github** (Microsoft) <svg viewBox="0 0 496 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg> **Bitbucket** <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M22.2 32A16 16 0 0 0 6 47.8a26.35 26.35 0 0 0 .2 2.8l67.9 412.1a21.77 21.77 0 0 0 21.3 18.2h325.7a16 16 0 0 0 16-13.4L505 50.7a16 16 0 0 0-13.2-18.3 24.58 24.58 0 0 0-2.8-.2L22.2 32zm285.9 297.8h-104l-28.1-147h157.3l-25.2 147z"></path></svg> **Gitlab** <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M105.2 24.9c-3.1-8.9-15.7-8.9-18.9 0L29.8 199.7h132c-.1 0-56.6-174.8-56.6-174.8zM.9 287.7c-2.6 8 .3 16.9 7.1 22l247.9 184-226.2-294zm160.8-88l94.3 294 94.3-294zm349.4 88l-28.8-88-226.3 294 247.9-184c6.9-5.1 9.7-14 7.2-22zM425.7 24.9c-3.1-8.9-15.7-8.9-18.9 0l-56.6 174.8h132z"></path></svg> And the list is long: [https://git.wiki.kernel.org/index.php/GitHosting](https://git.wiki.kernel.org/index.php/GitHosting) It is possible to copy a repository on several hosts (mirroring) ! *You can even have a remote on the same computer, or on an external disk ! For example another disk...but the reality is a bit more complex.* --- # Gorgious's repository **Repo** : github.com/Gorgious/name <img src="Tuto_git_files/figure-html/github-1.png" style="display: block; margin: auto;" /> --- # Clone a remote <img src="Tuto_git_files/figure-html/clone-1.png" style="display: block; margin: auto;" /> --- # Local commit <img src="Tuto_git_files/figure-html/local-1.png" style="display: block; margin: auto;" /> --- # Push <img src="Tuto_git_files/figure-html/push-1.png" style="display: block; margin: auto;" /> --- # Late <img src="Tuto_git_files/figure-html/retard-1.png" style="display: block; margin: auto;" /> --- # Pull <img src="Tuto_git_files/figure-html/pull-1.png" style="display: block; margin: auto;" /> --- # COMMIT -> PULL -> PUSH <img src="Tuto_git_files/figure-html/pull_push_diag-11-1.png" style="display: block; margin: auto;" /> --- # Conflits : DON'T PANIC A conflict occurs when several people modify the same document in the same place. Most of the time git handles the differences (**merge**) alone. It requires the intervention of a user in case of impossible choice. .pull-left[ ```bash # Commit d39ac60 x <- "Hi" - x <- paste(x,"this is a file") + x <- paste(x,"this is a great file") cat(x) ``` ```bash # Commit cbdac1e x <- "Hi" - x <- paste(x,"this is a file"). + x <- paste(x,"this is a boring file") cat(x) ``` ] -- .pull-right[ ```bash x <- "Hi" *<<<<<<< HEAD:file.R *+ x <- paste(x,"this is a great file") *======= *+ x <- paste(x,"this is a boring file") *>>>>>>> main:File.R cat(x) ``` We need to edit by hand (solve the conflict) and commit. ] It's important here to have someone in charge of the main repository. --- # Alternative : branches Be able to test things on a parallel history to make sure you don't break anything. <img src="Tuto_git_files/figure-html/branches-1.png" style="display: block; margin: auto;" /> **HEAD** : current status of the files. *master* et *dev* : branch names --- exclude: true class: inverse, center, middle # Introduction --- class: inverse, center, middle # Practice <!-- Ces slides présentent l'utilisation de Git avec Rstudio, Github Desktop, R et bien sur Git Bash qui est un terminal de commande. --> <!-- Bien que tout ces outils permettent de faire des dépots Git et de commit, plus on va avancer, plus il deviendra pertinent d'utiliser le terminal. --> <!-- Il est donc préférable de lire cette partie de [Happy git for Ruser](https://happygitwithr.com/shell.html) afin d'appréhender cet outils qui offre toute la puissance de git. --> <!-- Afin de ne pas paniquer, une [cheatsheet](https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf) est également disponible ici pour comprendre la plupart des options. --> --- # Config git account ! In Git Bash terminal : ```bash $ git config --global user.name 'Maxime Jaunatre' $ git config --global user.email 'myveryownmail@mail.com' $ git config --global --list ``` Or using the `{usethis}` package in R terminal : ```r ## install if needed (do this exactly once): ## install.packages("usethis") library(usethis) use_git_config(user.name = "Maxime Jaunatre", user.email = "myveryownmail@mail.com") ``` This allow to sign the commits --- # Initiate git ## Create a new folder (Rstudio project) In Git Bash terminal : ```bash $ cd $ git init tuto_git Initialized empty Git repository in path/to/your/directory/tuto/.git/ ``` <!-- Avec Github Desktop (GHD) : File > New Repository > Type name > Create repository --> With Rstudio : File > New Directory > R project > Type name + check "Create git repository" --- # Initiate git ## You can also add git to an existing project In Git Bash terminal : ```bash $ cd path/to/directory $ git init Initialized empty Git repository in path/to/your/directory/tuto/.git/ ``` In R terminal : ```r usethis::use_git() # Read the messages ! ``` <!-- Avec Github Desktop (GHD) : File > New Repository > Type name > Create repository --> With Rstudio : Tools > Project Options … > Git/SVN. Under “Version control system”, choose “Git”. Confirm New Git Repository? Yes! ??? Basically the same thing but from an existing directory. --- # Adding files to git repository Once the file is saved (Ctrl+S), **git** will observe the change! Check this in the Git tab or in the command terminal: ```bash $ git status ``` We can also see that in the Git tab which indicates a small *A* next to our file. ??? We can set Rstudio to show the git bash terminal! And that's handy --- # First commit We can make our first commit!!! It happens in 2 steps: add the files to the index and make the commit. .pull-left[ **Git Bash** ```bash $ git add Notes_Maxime.Rmd $ git commit ``` This will open a text editor! (We can write whatever we want here. ] .pull-right[ **Rstudio** * Click on Commit * Check the *Staged* box * Write the commit ] .pull-left[ **R** ```r usethis::use_git( message = "Initial commit" ) # or git2r::add(repo, "test.txt") git2::commit(repo, "Commit message") ``` ] .pull-right[ <img src="CSU_RepRo_files/figure-html/rstudio_commit.png" width="85%" style="display: block; margin: auto;" /> ] ??? Tab allows auto completion of file names ! --- # Repeat the operation Now we can modify the file and start again: **Edit -> Save -> Add to index -> Commit** -- You can check the status with *Diff* and the history with *log*. .pull-left[ **Git Bash** ```bash $ git status $ git diff $ git log ``` ] .pull-right[ **Rstudio** * Status -> Diff * log -> Clock icon ] .pull-left[ **R** ```r git2r::status() ``` ] .pull-right[ <img src="CSU_RepRo_files/figure-html/git_stage.png" width="85%" style="display: block; margin: auto;" /> ] Let's make some commits... Add some files to test! --- class: inverse, center, middle # Clone remote repository from github/gitlab --- # Config Github Token (PAT) ! Github does not work anymore with passwords -> security ! Create a token by going to [https://github.com/settings/tokens](https://github.com/settings/tokens) and -> "Generate token". Or in R : ```r usethis::create_github_token() ``` Validate the boxes "repo", "user" and "workflow". Don't forget to copy the key ! It will be requested the next time you use git and need it. You can even store it with R : ```r gitcreds::gitcreds_set() # interactive command ``` --- # Clone a github repository We will copy a remote repository to disk: **https://github.com/Ifremer-IAM/Tutorat_git** .pull-left[ **Git Bash** ```bash $ git clone <URL> ``` ] .pull-right[ **R** For once R doesn't do everything... ] .pull-left[ **Rstudio** * File -> New Project * Version Control -> Git * URL : copy the url ] .pull-right[ <img src="CSU_RepRo_files/figure-html/clone_repo.png" width="85%" style="display: block; margin: auto;" /> ] -- [Happy Git for the useR](https://happygitwithr.com/usage-intro.html) explains other cases than this one. ??? Take the time for everyone to pull and commit, because there will be conflicts! --- # Commit -> Pull -> Push <img src="Tuto_git_files/figure-html/diag-1.png" style="display: block; margin: auto;" /> --- # Create a new branch .pull-left[ **Git Bash** ```bash $ git checkout -b <NOM> ``` ] .pull-right[ **R** ```r git2r::branch_create(name = <NOM>) ``` ] .pull-left[ **Rstudio** * Onglet Git -> Symbole violet ] .pull-right[ <img src="CSU_RepRo_files/figure-html/new_branch.png" width="85%" style="display: block; margin: auto;" /> ] --- # Navigate in the history Once a certain number of commits have been defined, you can go back or change branches. ## Change branch .pull-left[ **Git Bash** You just have to give the name of the branch. We can list them as follows: ```bash $ git branch ``` Switch to the *main* branch ```bash $ git checkout main ``` ] .pull-right[ **Rstudio** * Git tab -> Next to the creation of branches you can choose which one to look at ] You can change branches if all files are **committed** or ignored. --- # Navigate in the history Once a certain number of commits are defined, you can go back or change branches. ## Change commit .pull-left[ **Git Bash** You just have to give the SHA of the commit. We can list them as follows: ```bash $ git log --oneline $ git checkout <SHA> ``` ] .pull-right[ **Rstudio** I haven't done this with Rstudio yet, if anyone finds it... ```r # git2r::checkout() ``` ] You can change commits if all files are **commit** or ignored. Another way to observe the past is to use **Github** which allows to easily visualize the history of a repository : see the article of [Happy Git for Ruser](https://happygitwithr.com/time-travel-see-past.html). --- # Explanation **git checkout** allows to move **HEAD**, which corresponds to what is presented on your computer. .pull-left[ <img src="Tuto_git_files/figure-html/head_act-1.png" style="display: block; margin: auto;" /> ] .pull-right[ <img src="Tuto_git_files/figure-html/head_branch-1.png" style="display: block; margin: auto;" /> ] -- .pull-left[ Reverting allows to see the state but you can also start a new branch re-commit from a past commit. Example: ```bash $ git checkout -b test A $ git add ... ; git commit -m 'F' ``` ] .pull-right[ <img src="Tuto_git_files/figure-html/head_past-1.png" style="display: block; margin: auto;" /> ] --- # Merging branches Once the code is working we can do a **merge** of the branches. .pull-left[ <img src="Tuto_git_files/figure-html/branch_pre-1.png" style="display: block; margin: auto;" /> ] .pull-right[ <img src="Tuto_git_files/figure-html/branch_premerge-1.png" style="display: block; margin: auto;" /> ] .pull-left[ A merge is always done from the target branch (*main*) by incorporating the external branch (here *dev*) ```bash $ git checkout main $ git merge dev ``` ] .pull-right[ <img src="Tuto_git_files/figure-html/branch merge-1.png" style="display: block; margin: auto;" /> ] In the case where each branch has commits, a new commit *merge* will be created with the opportunity to resolve conflicts. This commit belongs to both branches *main* and *dev*. --- exclude: false # Ressources Git .pull-left[ - [Tutoriel ThinkR : R and Git](https://thinkr.fr/travailler-avec-git-via-rstudio-et-versionner-son-code/) - [Advance R 📔, H. Wickham](https://adv-r.hadley.nz/) - [Happy Git and GitHub for the useR](http://happygitwithr.com/) - [Git cheatsheet](https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf) - [Quand ça part en vrille](https://github.com/k88hudson/git-flight-rules) - [Réparer une erreur](http://ohshitgit.com/) - [Créer une nouvelle branche avec git et merge des branches](https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches) ] .pull-right[ <img src="Tuto_git_files/figure-html/git.png" width="90%" style="display: block; margin: auto;" /> ] .footnote[ xkcd comics, [CC BY-NC 2.5 license](https://xkcd.com/license.html) ] ??? Beaucoup d'information est disponible. Encore une fois, il vaut mieux commencer sur un petit projet où l'on est à l'aise. --- class: inverse, center, middle # Merci! Des questions ❓ Slides en ligne [https://gowachin.github.io/R_presentation/Tuto_git.html](https://gowachin.github.io/R_presentation/Tuto_git.html) [Fichiers source <svg viewBox="0 0 581 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M581 226.6C581 119.1 450.9 32 290.5 32S0 119.1 0 226.6C0 322.4 103.3 402 239.4 418.1V480h99.1v-61.5c24.3-2.7 47.6-7.4 69.4-13.9L448 480h112l-67.4-113.7c54.5-35.4 88.4-84.9 88.4-139.7zm-466.8 14.5c0-73.5 98.9-133 220.8-133s211.9 40.7 211.9 133c0 50.1-26.5 85-70.3 106.4-2.4-1.6-4.7-2.9-6.4-3.7-10.2-5.2-27.8-10.5-27.8-10.5s86.6-6.4 86.6-92.7-90.6-87.9-90.6-87.9h-199V361c-74.1-21.5-125.2-67.1-125.2-119.9zm225.1 38.3v-55.6c57.8 0 87.8-6.8 87.8 27.3 0 36.5-38.2 28.3-87.8 28.3zm-.9 72.5H365c10.8 0 18.9 11.7 24 19.2-16.1 1.9-33 2.8-50.6 2.9v-22.1z"></path></svg>](https://github.com/gowachin/R_presentation) <!-- | [Fichier pdf <svg viewBox="0 0 384 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"></path></svg>](https://github.com/gowachin/R_presentation/raw/main/Tuto_git.pdf) --> <svg viewBox="0 0 496 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg> [gowachin](https://github.com/gowachin) <svg viewBox="0 0 384 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M290.7 311L95 269.7 86.8 309l195.7 41zm51-87L188.2 95.7l-25.5 30.8 153.5 128.3zm-31.2 39.7L129.2 179l-16.7 36.5L293.7 300zM262 32l-32 24 119.3 160.3 32-24zm20.5 328h-200v39.7h200zm39.7 80H42.7V320h-40v160h359.5V320h-40z"></path></svg> [gowachin](https://stackoverflow.com/users/12501379/gowachin) .footnote[ Slides created via the R package [**xaringan**](https://github.com/yihui/xaringan). ]