class: center, middle ![:scale 30%](/coding-club/assets/images/coding_club_logo_1.png) # 18 JUNE 2019 ## INBO coding club Herman Teirlinck
01.71 - Frans Breziers --- class: center, middle ![:scale 90%](/coding-club/assets/images/20190829/20190829_markdown_report.png) --- class: center, middle ![:scale 90%](/coding-club/assets/images/20190829/20190829_markdown_cheatsheet_preview.png) [Download pdf here](https://www.rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf) --- class: center, middle ### How to get started? Check the [Each session setup](https://inbo.github.io/coding-club/gettingstarted.html#each-session-setup) to get started. ### First time coding club? Check the [First time setup](https://inbo.github.io/coding-club/gettingstarted.html#first-time-setup) section to setup. --- class: center, middle ![:scale 100%](/coding-club/assets/images/coding_club_sticky_concept.png) --- class: center, middle ### Share your code during the coding session! Go to https://hackmd.io/oeoBUqGnQpSEtRYxKXTEJg
--- background-image: url(/coding-club/assets/images/background_challenge_1.png) class: left, middle # Challenge 1 - Using the interface of Rstudio, create an **Rmarkdown** New File, with an HTML output format. Save the document and **Knit** it to an HTML page. - Play with it a little by changing title, author, date, adding new sections... --- class: left, middle ## Intermezzo 1 - Did you know you can set date authomatically? ![:scale 100%](/coding-club/assets/images/20190829/20190829_markdown_set_date_auto.png) --- background-image: url(/coding-club/assets/images/background_challenge_2.png) class: left, middle # Challenge 2 Tables - Create a markdown table in markdown itself (no R!) - Create a nicely rendered markdown table of the `head(mtcars)` using R, the `kable` function and test how crazy you can go with [kableExtra](https://cran.r-project.org/web/packages/kableExtra/vignettes/awesome_table_in_html.html#text_specification) package! ![:scale 50%](/coding-club/assets/images/20190829/20190829_markdown_tables.png) --- class: left, middle ## Intermezzo 2 - Do you want always nice tables with the smallest effort possible? Set `df_print` argument in header! ![:scale 70%](/coding-club/assets/images/20190829/20190829_markdown_df_print_paged.png) - And did you know you can set a table of content as well? ![:scale 80%](/coding-club/assets/images/20190829/20190829_markdown_add_toc.png) --- background-image: url(/coding-club/assets/images/background_challenge_3.png) class: left, middle # Challenge 3 Do you have a R file you use often but never had the time to transform it in a nice Rmarkdown document for sharing with team, colleagues, scientists, ...? This is the perfect moment to (start to) do it! Make sure it is self-contained, so it can be rerun by someone else or the future-you. If you don't have such a file, you can transform this R file about geese counts: [`20190829/20190829_challenge.R`](https://github.com/inbo/coding-club/blob/master/src/20190829/20190829_challenge.R). Download* it in `./src` folder. Download also data file [`20190829/20190829_goose_counts_2018.csv`](https://github.com/inbo/coding-club/blob/master/data/20190829/20190829_goose_counts_2018.csv) to `./data` folder. You want to try something special? See some alternative [format options](https://rmarkdown.rstudio.com/formats.html).
* __Note__: check the getting started instructions on [how to download a single file](https://inbo.github.io/coding-club/gettingstarted.html#each-session-setup)
--- class: center, middle ![:scale 100%](/coding-club/assets/images/time_for_review.jpg) --- class: center, middle ## Did you know that... 1. Many INBO tutorials are written in R markdown and then _knitted_ as markdown documents? See [example](https://inbo.github.io/tutorials/tutorials/r_gbif_name_matching/). 2. [Data processing pipelines](https://trias-project.github.io/alien-plants-belgium/dwc_mapping.html) published as GitHub pages are R markdown documents? 3. Hackmd pages follow markdown syntax? ## Go pro From a R markdown document to a full INBO report? Get inspired by nice [Thierry's workshop](https://inbomd-examples.netlify.com/inbomd_workshop/inbomd_workshop.pdf). --- class: center, middle ![:scale 30%](/coding-club/assets/images/coding_club_logo_1.png) Room: Herman Teirlinck - 01.71 - Frans Breziers
Date: __24/09/2019__, van 10:00 tot 12:00
Title: Make your code functional: write functions
(registration announced via DG_useR@inbo.be)