Introduction to Data Science --Data Analysis and Prediction Algorithms with R 👀 via @rafalab: #rstats #DataScience #dataanalysis #Algorithms #rmarkdown #bookdown



Hadley Wickham (@hadleywickham; 33644): Awesome to see Statistics NZ (the official statistics agency of New Zealand) developing #rstats packages to make visualisation easier: 🇳🇿

David Schoch (@schochastics; 25541): My #Rstats package {{roughnet}} is finally on its way to CRAN🤩. The package allows to draw sketchy, hand-drawn-like networks.

Matt Dancho (Business Science) (@mdancho84; 23036): Did you know that visualizing maps is possible in #R? > It is! It’s called geospatial analysis. AND, I made a short tutorial on maps with #ggplot2 to help get you started. > Article: > #rstats

Kyle Walker (@kyle_e_walker; 21232): Group-wise spatial data analysis in #rstats / #rspatial is incredibly powerful, but can give you a headache if you don’t get it right.
> A thread on some some do’s and don’ts:


R Markdown (@rmarkdown; 12628): blogdown: Creating Websites with R Markdown #rstats #rmarkdown #bookdown

Rahul (@rsangole; 152): Over the weekend, I ported my #rstats site from {blogdown} to {quarto}. Though I started the endeavor quite apprehensive, it was such an easy and seamless transfer from old to new. > In just one day, I was able to setup: > 🙌🔥👏

Dr. Ryan Straight (@RyanStraight; 30): @madpoli90 @AcademicChatter @PhDVoice I do this with Rmarkdown and GitHub pages. Works great! May attempt to move to a #QuartoPub site instead of #blogdown but it’s too close to semester start now. >

Nguyen Tan Thai Hung (@Hung_TT_Nguyen; 20): @paleo_ray I use R Markdown. There are several packages that create websites from R Markdown such as blogdown and distill. My personal site is hosted on GitHub (free).

Leonardo Hansa (@l_hansa; 20): @joscani Te gustaría el libro, vicepresi… Si quieres, puedo contar en @CoRdoUsers cómo he usado blogdown para escribir un resumen del libro 😜

Knut Jägersberg (@JagersbergKnut; 10): R Blogdown is a bit clunky, but it is free and does the job. Personally, I find version control for content creation a bit overkill. But it is free and not too difficult to use. But it is not intuitive.

Hiroaki Yutani (@yutannihilation; 10): blogdown時代のやつは仕組み上markdownファイルあるけど、うっかりdistillに移行してしまったばっかりに難しい

tidyverse tweets (@tidyversetweets; 0/1): Can Blogdown output to sharepoint and/or pdf? #tidyverse #rstats

CRAN Package Updates (@CRANberriesFeed; 0/1): CRAN updates: blogdown bookdown CMF EpiInvert evaluate immunarch populR Rbeast #rstats


R Markdown (@rmarkdown; 1434355): Introduction to Data Science –Data Analysis and Prediction Algorithms with R 👀 > via @rafalab: > #rstats #DataScience #dataanalysis #Algorithms #rmarkdown #bookdown

Rosana Ferrero🕊☮️🏳 (@RosanaFerrero; 683166): 📈Anatomía de un ggplot 🔗 #data #dataviz #rstats #datascience #analytics #stats

Dr Di Cook (@visnut; 6714): This is an amazing resource for studying machine learning methods, with R, by @TDunn12

H_Shimizu 【東京医科歯科大・AIシステム医科学分野】 (@biomedicalhacks; 5012): Doing Meta-Analysis with Rという洋書のオンラインバージョンです。ネットワークメタアナリシスやベイジアンメタアナリシスなど高度なものまで解説しています。理論もコードもあるのでメタアナリシスを勉強したい方はぜひ

Yngvild Vindenes (@yvinden; 4014): Updated version of my compendium “Demographic methods in life history theory - An introduction with R” With more examples, exercises and suggested solutions💻: #rmarkdown #bookdown

Dan Quintana (@dsquintana; 277): I almost always send them the link to this meta-analysis book too, which addresses most meta-analysis inquiries I get

EHolmes (@eeholm; 173): Creating custom title pages for my books created with R Markdown (bookdown) has always been a struggle for me. Quarto makes this quite a bit easier. In this video, I show how to do this. Link to the GitHub repo is in the thread. @quarto_pub #OpenScience

Jon Harmon (he/him) (@JonTheGeek; 135): Are there GHA examples for #QuartoPub @quarto_pub to install packages (ideally both #RStats via DESCRIPTION and python via whatever python would use, if possible) and render to github pages, like with bookdown? @thomas_mock

Camille Landesvatter (@c_landesvatter; 112): Our API review has a new chapter! @und_dom introduces the Reddit API by using subreddits on politics and on cats 🤓

Deemah 🇺🇦 🇳🇴 🇸🇪 (@dmi3k; 74): If you are struggling to get your math equations automatically numbered when knitting to PDF with {bookdown}, include this chunk into your Rmd file #RStats This will allow you to still use Markdown’s $$ y=a+bx (#eq:myeq) $$ and ${b>0}$ and refer as \@ref(eq:myeq) in the text

Charlotte (@charliejhadley; 70): @d_olivaw It changes “Figure 2.1” to “Fig 2-1” in all formats that use {bookdown}, which includes {pagedown} > The use of gsub() instead of {stringr} is purely for the aesthetics of the tweet and for my own amusement. > I will write a blogpost when I’m at 12 of lectures done, currently 111

Lisa DeBruine 🏳️‍🌈 (@LisaDeBruine; 60): @q_observations @ChelseaParlett This is the thing I hate most about #quarto! Not the callout blocks, but the fact that I’ve been laboriously adding things like this into the @PsyTeachR bookdown template for years, and now I need to change everything to use this much better, simpler version :)

Tim Kaiser (@tkaiser_science; 60): @fusaroli @MathiasHarrer wrote a really nice ebook

Brenton Wiernik 🏳️‍🌈 (@bmwiernik; 60): @fusaroli @robinnkok This book also discusses the links between the two frameworks nicely

清家 ようすけ (@yosuke_seike; 40): jamovi 無料かつ簡単操作の統計ソフト 基本的な分析から分散分析、因子分析なども一通りできるので学生の卒論指導にも使えそうなソフトの一つ。

Jared Lander (@jaredlander; 40): @JonTheGeek I haven’t really switched over because I don’t have the need. rmarkdown does everything I want, which is mainly slides, flexdashboard, PDF and bookdown. I did one slideshow using quarto just because xaringan couldn’t handle all the htmlwidgets in self contained mode.

Mapas Lab (@MapasLab; 40): Are your summary statistics hiding something interesting?

Patrick Elliott, BSc, MPH (@PatrickElliott0; 40): Looking forward to reading this book! @dsquintana > Twitter for Scientists #rmarkdown #bookdown

Matt DeCarlo (@profmattdecarlo; 40): @WarwickLanguage @econproph @actualham @pressbooks @cogdog OpenAuthor (OER Commons) has a good authoring tool tho I don’t like how it navigates. Overleaf, bookdown, latex are all options. But I’m probably going to check out Libretexts

obrl_soil (@obrl_soil; 30): Maybe I’ve missed it, but one thing I haven’t seen in the #bookdown-to-#quarto conversion guides thus far is how much editing all the inter-chapter crossrefs need. That’s hard to automate, and I have so many cross-links 😭

Ming “Tommy” Tang (@tangming2005; 25): There are so many good #rstats books at #rstats

David Keyes (@dgkeyes; 23): Is there a way I can change the figure captions in RMarkdown (bookdown specifically) so that instead of Figure 2.1 I get Figure 2-1? #rstats

Nigel Jacob (@nsjacob; 21): Urban Informatics: Using Big Data to Understand and Serve Communities #rmarkdown #bookdown

Lisa DeBruine 🏳️‍🌈 (@LisaDeBruine; 20): @datavisFriendly @SolomonKurz has a version with tidyverse >

tidyverse tweets (@tidyversetweets; 12): Customising Colour / Boldness in Markdown with RMarkdown / Bookdown #tidyverse #rstats

atusy (@Atsushi776; 11): bookdown::gitbookにコードの折り畳み機能を追加するPRを提出した #rstatsj

Jeremy is just a regular expression (@jeremy_data; 10): @statistishdan @PipingHotData How would a verbatim chunk look?

Ed Semi Novo (@edveggio; 10): @andrespsyc > This book is my favorite. 100% free, kinda funny and however absolutely acurate. > And If you need any help to discuss, sendo me a DM.

Jared Lander (@jaredlander; 10): @JonTheGeek Though I’m considering switching from bookdown to quarto because, just because.

Jon Harmon (he/him) (@JonTheGeek; 10): @thomas_mock @quarto_pub @dvaughan32 I see lots of different examples. I don’t see a simple “render, ya know, like you do with bookdown” example, which was surprising. I’ll cobble something together.

Jon Harmon (he/him) (@JonTheGeek; 10): Hmm, I guess those bits from bookdown can probably copy over pretty directly. > I don’t THINK switching to renv would be the way to go with book clubs, but I need to think about that. And I see the quarto GHA examples tell you how to deal with python…

智 (@ToM_Psy_s; 10): 【本日の #心理学ニュース】 心理学の実験室実験とAPAレポート覚書~水着着用で数学のテストが悪くなる? > 組織が健全な社内政治を実現する5つの戦略 > jamoviで学ぶ心理統計

grey (@greyanneco; 10): ayaw na yung bookdown sa tg vhebs wer to dl plzzz :-(

Chris Hartgerink (@chartgerink; 10): Quarto has really been making the rounds in the past few weeks. > @juliesquid told me about it around a year ago, and it’s come a long way since > If I was writing my dissertation, I would no longer choose bookdown but quarto! >

Annie Wright (@Annie_Stats; 10): There’s some nice documentation of the names and strips here ⬇️⬇️⬇️

Charlotte (@charliejhadley; 10): @dgkeyes You can use the internationalisation options like I did on one of our projects to remove caption numbers 😊 >

Peter Higgins (@ibddoctor; 10): @RLevantovsky This can be a helpful resource

Mickaël CANOUIL (@MickaelCanouil; 10): @ronnybergmann_ @_tarleb @quarto_pub I did not try much Julia in Quarto. But it might rely on Jupyter indeed: “Quarto executes Julia code using the IJulia Jupyter kernel.” But you could use JuliaCall and knitr. The list of engines available in knitr:

Yvonne Githiora-Murimi (@foikeza; 10): Statistics for Ecologists - a free open-source textbook #rmarkdown #bookdown

EHolmes (@eeholm; 10): Pain point #1. How to get title pages. If you look at the html output for Quarto (and bookdown), there is no title page. You would be shocked at how hard it is to get a measly chapter break so that the title material appears on it’s own page.

tidyverse tweets (@tidyversetweets; 0/1): How to solve the “file name conversion problem – name too long?” error when rendering a publication in Bookdown? #tidyverse #rstats


Sharon Machlis (on staycation & offline for a bit) (@sharon000; 220): New in {knitr}, @thomas_mock tells his #Quarto workshop: > convert_chunk_header(“doc.qmd”, output = identity) > to convert R Markdown syntax like fig.width=1 syntax to #| fig-width: 1

Daniel Sjoberg (@statistishdan; 95): Seeing strange behavior with #quartopub and the ‘cache’. > Does anyone know of a repo successfully using it so I can poke around? > Working on presentation at the moment, and I hope the cache will make the rendering process 100x better/faster 🕺🪩 > > #rstats

Tom Mock ❤️ Quarto (@thomas_mock; 60): @ryderdavid Thanks for using the #QuartoPub hashtag! > Not currently one that converts all of YAML but for chunk options use dev knitr: knitr::convert_chunk_header(“doc.qmd”, output = identity) > Some complexity: Old .rmd YAML doesn’t map 1:1 with .qmd, whereas knitr is backwards compatible.

Hiroaki Yutani (@yutannihilation; 60): reprex::reprex() でコードコメントじゃなくて本文(?)のコメントを挟みたいとき、こう書けますよ、という豆知識(使う場面はあまりない)

tidyverse tweets (@tidyversetweets; 33): How to break a knitr table in multiples column in PDF output? - Rmarkdown #tidyverse #rstats

Dr. Robert M Flight (@rmflight; 32): I’m not sure what version of {knitr} / {rmarkdown} supports the new option syntax of code chunks in #quarto / #rstats >

#| label: foo

But I’ve modded my code snippets to include this one:

snippet r

#| label: ${1}


Michael Friendly (@datavisFriendly; 31): For anyone looking for some #Quarto / #knitr / #LaTeX magic, check out the Github source used to generate the figs and matching equations on the bottom of the Main readings slide using the #rstats {mathtools} 📦

Tom Mock ❤️ Quarto (@thomas_mock; 30): @statistishdan @quarto_pub Yup! This is the way! > fs::dir_tree() ├── exercises │ └── test.Rmd ├── exsite │ ├── _quarto.yml │ ├── about.qmd │ ├── index.qmd │ └── styles.css └── test-quarto-projects.Rproj > Files in exercises are unaffected, still have knitr button.

tidyverse tweets (@tidyversetweets; 22): R: Beginner package developer fails to knitr its first README.Rmd due to “could not find function” #tidyverse #rstats

June Choe (@yjunechoe; 20): @statistishdan @umairdurrani87 These are so hard! Nothing in my mental model of YAML opts says cache is top-level vs. under execute. > Ex2: dev goes under knitr, not execute. Weird bc graphics devices tend to be language-agnostic, though makes sense given interfaces are language-specific, like {ragg}.

josiah (@JosiahParry; 20): @statistishdan @thomas_mock Honestly, I’ve always used knitr::kable() + render asis lol

Carlos Scheidegger (@scheidegger; 20): @charliejhadley @thomas_mock @j_perkel @minebocek @juliesquid I don’t think so, unfortunately. This is a Knitr trick we’re borrowing. We definitely would like to teach Jupyter that trick, though.

Jesús Vélez Santiago (@jvelezmagic; 20): @dgkeyes You can check Quarto’s Knitr Options. 😋✨

tidyverse tweets (@tidyversetweets; 11): Display output of knitr in rmarkdown loop #tidyverse #rstats

Mickaël CANOUIL (@MickaelCanouil; 10): @statistishdan @quarto_pub And for #QuartoPub code cell options for the knitr engine:

Mickaël CANOUIL (@MickaelCanouil; 10): @statistishdan For #QuartoPub (@quarto_pub) you can visit the following section of the documentation to see how to set knitr options in quarto

Kosti ( holiday mode🌴) (@kgourg; 10): @xenophar Nothing that matches the interactivity sadly. Most alternatives try to match knitr or pweave, which aren’t really interactive.

Tom Mock ❤️ Quarto (@thomas_mock; 10): @JosiahParry @statistishdan Ha! That works for a lot of stuff, not a bad workflow. > For summary model output though: > summary(m1) |> knitr::kable() > Error in : cannot coerce class ‘“summary.glm”’ to a data.frame > 😿

Kostadin Kostadinov (@kostadinoffMD; 10): Hey @quarto_pub community I’m wandering wthat is the quarto alternative for knitr::opts_chunk$set(dev = “cairo_pdf”) ? @thomas_mock

Tom Mock ❤️ Quarto (@thomas_mock; 10): @JosiahParry @JonTheGeek RMarkdown is NOT deprecated. > RMarkdown is going to continue to be maintained and bug-fixed, and knitr is still the core R engine behind both RMarkdown and for Quarto. > From Yihui himself: > “With Quarto Coming, is R Markdown Going Away? No.”

Shah Nawaz (@shah_f1; 10): @FilmicAesthetic for example we can print rmarkdown file to pdf by knitr. what if i write notes for myself in console while running .R file ? how can I print those in pdf. It can help to tally the code. in this way we will have 2 files. 1 with comments from console and 1 with code

EHolmes (@eeholm; 10): This shows how to dynamically create tables that have table numbers and table captions across all formats (well, there is a bug for flextable+Word, but Quarto knows about it). It uses the knitr::knit_expand() trick which allow dynamic vars as {{}}

Tom Mock ❤️ Quarto (@thomas_mock; 10): @sharoz @charliejhadley @rstudio The traditional knitr syntax will always work, so no need to force a change. > The screenshot below shows how long strings are better suited to the YAML style chunk options as opposed to trying to fit it ALL into 1 line in ```{r long text string that goes on forever w/ soft wrap}

Tom Mock ❤️ Quarto (@thomas_mock; 10): @sharoz @charliejhadley @rstudio “prefer” here is indicating that the Quarto docs will only show that syntax. It’s cross-language (R/Py/Julia) whereas {r echo=TRUE} is knitr only. > The #| syntax also adds auto-completion and descriptions to the chunk options and means that YAML is consistent with chunk options.

Ronny Bergmann @ GAMM (@ronnybergmann_; 10): @MickaelCanouil @_tarleb @quartopub …and don’t get me wrong, whoever wants to use Jupyter or knitr should please do that. I feel I have more python versions installed than I ever used it – and no experience with R, so I would prefer to not spent (probably much) time setting that up. [↪](

Mickaël CANOUIL (@MickaelCanouil; 10): @ronnybergmann_ @_tarleb @quarto_pub Of course, Jupyter is the best kernel when one wants to use Python, but for all (or almost) other cases knitr will work smoothly (it relies on the R package of the same name, thus on R itself as well).

Mickaël CANOUIL (@MickaelCanouil; 10): @ronnybergmann_ @_tarleb @quarto_pub Depending on the main language, you have to set a kernel/engine which is going to be used for the whole document. Julia has a dedicated kernel. For Python, indeed there is Jupyter. For R, there is knitr. Each of those kernel supports several languages.


Amelia McNamara (@AmeliaMN; 63): I’m in the throes of some stupid LaTeX/RStudio/who knows debugging hell, and can’t see the forest for the trees. Any ideas?

閑忙庵主 (@himagine_angler; 20): quartoちょっとだけ触った PDF出力で使うtinytexで躓いた 先は長い

Donald L. Elbert (@don_elbert; 20): I used Visual Studio Code as the IDE. Pretty smooth! Rendering HTML output was easy and fast. However, it would not open tinytex so I had to print the .tex file to pdf in RStudio.

CRAN Package Updates (@CRANberriesFeed; 12): CRAN updates: fiery hwep irtplay pacviz tinytex #rstats

🌱🌿☘️🍀 (@cm_ayf; 10): M1 Mac Studio上のDockerでRStudio Serverを起動しtinytexをインストールするなどしている


Indrajeet Patil (इंद्रजीत पाटील) (@patilindrajeets; 8319): I’ve been converting some presentations made in {Xaringan} 📦 to #Quarto revealjs format ( > Although not everything has 1-to-1 mapping, I’ve tabulated a few recurring conversions; may be helpful in case others are doing similar conversions! 🔀 > #rstats

Charlotte (@charliejhadley; 304): You can add emoji to your {xaringan} slide counter with the following CSS > .remark-slide-number::before { content: “👩‍🏫”; } > Which I’m doing to distinguish between lecture and workshop notes

tidyverse tweets (@tidyversetweets; 32): How to make a space between two side-by-side images in xaringan slides using rmarkdown #tidyverse #rstats

Charlotte (@charliejhadley; 20): I’m using {RefManager} within {xaringan} slides and have discovered I need to knit the document twice for the BibOptions() to be correctly applied. > I’m used to double typsetting in LaTeX but never saw this before in RMarkdown land 😵‍💫

nissinbo (@nissinbo; 10): @mopcup xaringanでcssいじってると思います ↓コードのハイライトはこれが参考になりそうです [↪](

Dr. Ryan Straight (@RyanStraight; 10): @charliejhadley @bmwiernik Good excuse to start using #quartopub slide decks! Same feel as xaringan but citation is native.

Cory Brunson (it’s OK to unsubscribe from NYT) (@cornelioid; 10): Here are my slides (early draft + xaringan revision) for anyone interested: (Single fresh commit because i accidentally committed data and still don’t know how to rebase.)

CRAN Package Updates (@CRANberriesFeed; 0/1): CRAN updates: DT gimme html5 rintrojs xaringan #rstats

Mickaël CANOUIL (@MickaelCanouil; 20): @wouldeye125 It depends on what you need and from where you are coming from. You can read @xieyihui blog post and have a look at @quarto_pub website to make your own mind with the gallery for example.

Hiroaki Yutani (@yutannihilation; 60): reprex::reprex() でコードコメントじゃなくて本文(?)のコメントを挟みたいとき、こう書けますよ、という豆知識(使う場面はあまりない)

Tom Mock ❤️ Quarto (@thomas_mock; 10): @JosiahParry @JonTheGeek RMarkdown is NOT deprecated. > RMarkdown is going to continue to be maintained and bug-fixed, and knitr is still the core R engine behind both RMarkdown and for Quarto. > From Yihui himself: > “With Quarto Coming, is R Markdown Going Away? No.”