Back to Browse

Producing reports with Rmarkdown

116 views
Mar 21, 2022
56:18

Lorenzo Bertola presents Producing reports with Rmarkdown / knitr. Adapted from https://swcarpentry.github.io/r-novice-gapminder/15-knitr-markdown/index.html. --CHAT-- 00:07:26 Kevin Erickson: 23/42 if I had to put it on a scale 00:07:26 Aurelie Moya: Hello, I have never used R markdown before. 00:07:29 Legana Fingerhut: Rmarkdown ftw! 00:07:59 Lorenzo Bertola: https://swcarpentry.github.io/r-novice-gapminder/15-knitr-markdown/index.html 00:15:04 Kevin Bairos-Novak [JCU]: Agreed! 00:15:27 Kevin Erickson: Overachiever 00:16:41 Legana Fingerhut: Or GitHub markdown! 00:16:52 Legana Fingerhut: Which isn’t specified there…. But you can! And it’s awesomeness. 00:23:38 Legana Fingerhut: Rmarkdown theme gallery for HTML: https://www.datadreaming.org/post/r-markdown-theme-gallery/ 00:24:31 Kevin Erickson: Can you back date? ;) 00:24:41 Kevin Bairos-Novak [JCU]: `r Sys.time()` uses backquotes (top left-hand side of english keyboard) 00:25:06 Kevin Bairos-Novak [JCU]: @Kevin maybe Sys.time() - lubridate::days(20)? ;P 00:25:28 Kevin Bairos-Novak [JCU]: lubridate package would be helpful anyways haha 00:27:07 Lorenzo Bertola: https://www.rstudio.com/wp-content/uploads/2015/02/rmarkdown-cheatsheet.pdf 00:27:54 Lorenzo Bertola: https://bookdown.org/yihui/rmarkdown/ 00:32:14 Kevin Bairos-Novak [JCU]: I thought you made that haha 00:33:36 Kevin Erickson: Projecting Lorenzo’s laptop battery capacity… IDK if he’ll make it to the end 00:34:25 Legana Fingerhut: 🤣 00:36:29 Estefania Erazo Mera: maybe a naïve question, but May I use this lovely way to present my procedures in GitHub? 00:36:59 Legana Fingerhut: Yeah absolutely, I recommend using GitHub markdown 00:37:28 Legana Fingerhut: You can use it using “output: github_document” in your Rmarkdown 00:37:44 Legana Fingerhut: It will render another .md document which can then be viewed nicely in GitHub 00:38:05 Estefania Erazo Mera: Thanks :) 00:38:39 Legana Fingerhut: See one of my repos as an example, https://github.com/Legana/AMP_pub 00:40:01 Kevin Erickson: Latex is your friend! 00:40:17 Legana Fingerhut: Latex is nobody’s friend 00:40:42 Estefania Erazo Mera: 😂 00:41:50 Aurelie Moya: Could you please repeat how you produce a code chunk? What’s the shortcut? 00:42:15 Legana Fingerhut: the keyboard shortcut Ctrl + Alt + I (OS X: Cmd + Option + I) 00:42:29 Aurelie Moya: Thank you Legana 🙂 00:44:13 Legana Fingerhut: A full list of shortcuts in RStudio can be found under the menu Tools - Keyboard Shortcuts Help 00:45:00 Aurelie Moya: Awesome! 00:45:54 Legana Fingerhut: Sorry my dog was barking at the naughty postman. What did you want a link to? 00:46:10 Kevin Erickson: The Friday Coding meetups 00:47:24 Legana Fingerhut: Oh I don’t know about those. Must be an exclusive group! 😛 00:48:03 Kevin Bairos-Novak [JCU]: What’s the friday coding meetups?! 00:48:39 Legana Fingerhut: Exclusive members only, Kevin! We are not wanted 🙁 00:48:46 Legana Fingerhut: Must be python users 00:50:05 Kevin Erickson: Isn’t there an in-person Friday afternoon meet-up in the science place for something? 00:50:57 Adrien Marc: Not sure if this is part of this session, but do you have a good way to make custom summary table om Rmark. I am getting around with Tabular but it is limited 00:52:07 Kevin Bairos-Novak [JCU]: @Adrien, I like kable() from the knitr package (https://bookdown.org/yihui/rmarkdown-cookbook/kable.html) but @Legana is the table building expert, she might have other good options! 00:53:40 Legana Fingerhut: Nope! I prefer using figures …. I’ve used Kable before though. It’s easy to use 🙂 00:54:48 Kevin Bairos-Novak [JCU]: https://gt.rstudio.com/articles/intro-creating-gt-tables.html gt is the package I used to make my results tables for the paper Lorenzo presented earlier 00:55:26 Legana Fingerhut: Blog about making nice tables in Rmarkdown, it’s got a few packages listed: https://rfortherestofus.com/2019/11/how-to-make-beautiful-tables-in-r/ 00:57:13 Legana Fingerhut: I use message = FALSE and warnings = FALSE as default 00:58:01 Legana Fingerhut: it just clutters up your pretty rendered markdown file otherwise … 00:59:28 Legana Fingerhut: It could just be added after “echo = TRUE 00:59:37 Legana Fingerhut: In the rsetup chunk 01:00:02 Legana Fingerhut: yep 01:00:20 Legana Fingerhut: Next to echo 🙂 01:00:41 Legana Fingerhut: No big deal. It just saves you having to make a separate code chunk 01:01:30 Kevin Bairos-Novak [JCU]: knitr 01:01:41 Legana Fingerhut: Knitr::kable ? 01:02:56 Legana Fingerhut: 4% Battery life Lorenzo! 01:03:01 Estefania Erazo Mera: Thanks Lorenzo, Legana and Kevin,.. this is awesome :) 01:03:18 Legana Fingerhut: 🥰 01:03:26 Aurelie Moya: Thank you very much! So useful!! 🙂 01:03:46 Adrien Marc: Thank you Lorenzo! 01:03:57 Lorenzo Bertola: If you are not yet on our slack channel, join here: https://join.slack.com/t/coder-tsv/shared_invite/zt-echgny35-E1GRwGgljGbIsL5nE6W1Ig

Download

0 formats

No download links available.

Producing reports with Rmarkdown | NatokHD